Unfortunately, that still doesn’t work – it still considers the packages loaded
in the initial Nuke install to be loaded already, so won’t load different
packages. What I need is for it to behave as if I created a totally new console
and typed in the launch commands; even though this creates a new CMD window, it
behaves as if it were an extension of the same cmd that launched Nuke
initially. Maybe I need a different approach…
den serras
@ stereoD
From: [email protected]
[mailto:[email protected]] On Behalf Of Nathan Rusch
Sent: Tuesday, September 17, 2013 9:38 AM
To: Nuke Python discussion
Subject: Re: [Nuke-python] Launch a totally new Nuke process... From inside Nuke
'start' works fine with 'cmd', but it isn't an executable, so you have to run
it... through cmd again. You should be using subprocess.Popen instead of
os.system though:
args = ['cmd', '/C', 'start', 'cmd', '/K',
os.path.normpath(nuke.env['ExecutablePath'])]
if nuke.env['nukex']:
args.append('--nukex')
subprocess.Popen(args)
-Nathan
From: Dennis Serras<mailto:[email protected]>
Sent: Monday, September 16, 2013 6:38 PM
To:
[email protected]<mailto:[email protected]>
Subject: [Nuke-python] Launch a totally new Nuke process... From inside Nuke
Having fun trying to launch Nuke from Nuke. We have a custom Windows command
line launch system that handles all the packages, versions, licensing, etc.;
it’s based on subprocess.Popen. I’m building a tool that allows launching of a
script with a different build and/or package of Nuke. When I use the usual
culprits (subprocess.call, subprocess.Popen, os.popen, etc.) they all want to
launch a new Nuke in the same cmd window and with the same setup as the current
one – if I use any other setup it fails. So I figured I need to launch from a
new cmd window – so tried os.system(“start cmd /K blahblah”), and
os.startfile(“blahblah.bat”) which created a new cmd window – but it still has
the same problem. Of course if I use cmd directly I can launch as many
different versions of Nuke as I have licenses free. Any ideas how I can do this?
Thanks!
Den
den serras
@
senior technical artist | stereo D | deluxe 3D
This e-mail and any attachments are intended only for use by the addressee(s)
named herein and may contain confidential information. If you are not the
intended recipient of this e-mail, you are hereby notified any dissemination,
distribution or copying of this email and any attachments is strictly
prohibited. If you receive this email in error, please immediately notify the
sender by return email and permanently delete the original, any copy and any
printout thereof. The integrity and security of e-mail cannot be guaranteed.
________________________________
_______________________________________________
Nuke-python mailing list
[email protected]<mailto:[email protected]>,
http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
This e-mail and any attachments are intended only for use by the addressee(s)
named herein and may contain confidential information. If you are not the
intended recipient of this e-mail, you are hereby notified any dissemination,
distribution or copying of this email and any attachments is strictly
prohibited. If you receive this email in error, please immediately notify the
sender by return email and permanently delete the original, any copy and any
printout thereof. The integrity and security of e-mail cannot be guaranteed.
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python