Last Updated: February 25, 2016
·
11.14K
· emi420

How to run a background process with Python

The key to run a background process is not create an action that depends of the result of the process.

For example, this won't work:

p = Popen(['ls', '-R', '/'], stdout = PIPE, stderr = PIPE)

But this will work:

p = Popen(['ls', '-R', '/'])

1 Response
Add your response

What about if you do want to write to the new process's stdin?

over 1 year ago ·