Hiding Console Output
Simon Forman
rogue_pedro at yahoo.com
Thu Aug 3 13:37:00 EDT 2006
Kkaa wrote:
> This seems like the right thing to do, but it runs the program in the
> background, and I need my program to wait until the x.exe has finished.
> I tried using this code:
>
> p =
> subprocess.Popen("x.exe",shell=True,stdout=subprocess.PIPE,stdin=subprocess.PIPE,
> stderr=subprocess.PIPE)
> sts = os.waitpid(p.pid, 0)
>
> But I get the error: "No child process". Any ideas?
Read the docs.
Here's a link to the docs for the subprocess.Popen object. Note the
second method? http://docs.python.org/lib/node239.html
More information about the Python-list
mailing list