'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 
Sent: Monday, September 16, 2013 6:38 PM
To: [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], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to