Running another python interpreter

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sat Oct 20 12:51:42 EDT 2007


En Sat, 20 Oct 2007 06:12:23 -0300, Simon Pickles <sipickles at hotmail.com>  
escribi�:

> This is very nearly perfect. I have a second console window.
> Unfortunately, the first is waiting for the second to close. Is there
> anyway to specify the equivalent of os.P_NOWAIT?

Use the more generic version:

subprocess.Popen([sys.executable, "gateway.py", "other", "arguments"],  
creationflags = subprocess.CREATE_NEW_CONSOLE)

For more info on the subprocess module, see  
http://docs.python.org/lib/module-subprocess.html

-- 
Gabriel Genellina




More information about the Python-list mailing list