subprocess question re waiting

Alain Ketterlin alain at dpt-info.u-strasbg.fr
Mon Apr 8 07:48:56 EDT 2013


loial <jldunn2000 at gmail.com> writes:

> I want to call a child process to run a shell script and wait for that
> script to finish. Will the code below wait for the script to finish?
> If not then how do I make it wait?
[...]
> process = subprocess.Popen(command, stdin=subprocess.PIPE,stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True, shell=True)

process.wait()

-- Alain.



More information about the Python-list mailing list