subprocess.Popen not replacing current process?

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Thu Nov 4 19:43:00 EDT 2010


In message
<0f1a17f4-b6a9-4e89-ac26-74b1098a065e at b19g2000prj.googlegroups.com>, goodman 
wrote:

> Hi, I'm wondering why subprocess.Popen does not seem to replace the
> current process, even when it uses os.execvp (according to the
> documentation:
> http://docs.python.org/library/subprocess.html#subprocess.Popen).

You’ll notice that in the list at the top of the functions that subprocess 
replaces, there are no os.exec* entries. subprocess is only for spawning new 
processes; if all you need to do is an exec, do an exec 
<http://docs.python.org/library/os.html#process-management>; subprocess 
can’t offer anything to make that any simpler.




More information about the Python-list mailing list