Can subprocess.call be invoked without waiting for process to finish?

python

Solution

Use `subprocess.Popen` instead of `subprocess.call`:

process = subprocess.Popen(['foo', '-b', 'bar'])

`subprocess.call` is a wrapper around `subprocess.Popen` that calls `communicate` to wait for the process to terminate. See also What is the difference between subprocess.popen and subprocess.run.

Problem

I'm currently using subprocess.call() to invoke another program, but it blocks the executing thread until that program finishes. Is there a way to simply launch that program without waiting for return?

Original source

Related problems