Running another python interpreter

Simon Pickles sipickles at hotmail.com
Sat Oct 20 05:12:23 EDT 2007


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?

Gabriel Genellina wrote:
> --- Simon Pickles <sipickles at hotmail.com> escribió:
>
>   
>> os.spawnl(os.P_NOWAIT, sys.executable,
>> sys.executable, "gateway.py")
>> ... works but both process output to the same
>> interpreter window. Is there a way to run another
>> interpreter window containing gateway.py?
>>     
>
> Use the subprocess module, passing CREATE_NEW_CONSOLE into creationflags:
>
> subprocess.call([sys.executable, "gateway.py", "other", "arguments"],
>                  creationflags = subprocess.CREATE_NEW_CONSOLE)
>
>   



More information about the Python-list mailing list