On Tue, Jul 20, 2010 at 8:33 AM, loial <jldunn2...@gmail.com> wrote: > I have a requirement to kick off a shell script from a python script > without waiting for it to complete. I am not bothered about any return > code from the script. > > What is the easiest way to do this. I have looked at popen but cannot > see how to do it.
Use the `subprocess` module. import subprocess proc = subprocess.Popen(["shell_script.sh", "arg1", "arg2"], stdout=subprocess.PIPE, stderr=subprcoess.PIPE) # lots of code here doing other stuff proc.wait() I believe you need to /eventually/ call .wait() as shown to avoid the child becoming a zombie process. Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list