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 -- http://mail.python.org/mailman/listinfo/python-list