This may work on a PC, which would make it a little more portable. Only bug in it so far on a mac is its tendency to pop up a blank message the first time it completes. Also I'd rather get this working with spawnv, but so far it's locking up because of the python thread already being run in nuke.
Also if you find it doesn't work the first time off the bat on a PC, try removing the '-t ' part of the nukePath string.
scriptPath = nuke.toNode('root').name()
nukePath = nuke.env['ExecutablePath'] + ' -x -n -q -t -i ' + scriptPath