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

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.

Leave a Comment