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?

Any help appreciated.


import subprocess

command = "/home/john/myscript"

process = subprocess.Popen(command, 
stdin=subprocess.PIPE,stdout=subprocess.PIPE, stderr=subprocess.PIPE, 
close_fds=True, shell=True)

out, err = process.communicate()
returncode = process.returncode
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to