![Mike Driscoll on Twitter: "#Python's `subprocess` module also lets you read stdout and stderr during a long running process. One common method of accomplishing this is to use `subprocess.Popen` and set `stdout=subprocess .PIPE` Mike Driscoll on Twitter: "#Python's `subprocess` module also lets you read stdout and stderr during a long running process. One common method of accomplishing this is to use `subprocess.Popen` and set `stdout=subprocess .PIPE`](https://pbs.twimg.com/media/FW1FOXCXoAIrS_c.jpg:large)
Mike Driscoll on Twitter: "#Python's `subprocess` module also lets you read stdout and stderr during a long running process. One common method of accomplishing this is to use `subprocess.Popen` and set `stdout=subprocess .PIPE`
![Run a subprocess in python and both show the output in "real time" and save it to a variable - Stack Overflow Run a subprocess in python and both show the output in "real time" and save it to a variable - Stack Overflow](https://i.stack.imgur.com/YS2am.jpg)
Run a subprocess in python and both show the output in "real time" and save it to a variable - Stack Overflow
![Console breaks subprocesses stdout/stderr PIPE if script finishes before the subprocess · Issue #118 · spyder-ide/spyder-kernels · GitHub Console breaks subprocesses stdout/stderr PIPE if script finishes before the subprocess · Issue #118 · spyder-ide/spyder-kernels · GitHub](https://user-images.githubusercontent.com/14357794/60247705-7c8c5000-9904-11e9-8f7d-04c7fc5ed1f8.png)
Console breaks subprocesses stdout/stderr PIPE if script finishes before the subprocess · Issue #118 · spyder-ide/spyder-kernels · GitHub
![ms. sophie bites on Twitter: "python people: why might subprocess.Popen('wc -l', stdin=subprocess.PIPE, shell=True) sporadically throw "OSError: [Errno 9] Bad file descriptor"? Only happens sometimes. Google has been no help. (Most other people ms. sophie bites on Twitter: "python people: why might subprocess.Popen('wc -l', stdin=subprocess.PIPE, shell=True) sporadically throw "OSError: [Errno 9] Bad file descriptor"? Only happens sometimes. Google has been no help. (Most other people](https://pbs.twimg.com/media/EKFa_hQXYAMyU4d.jpg)
ms. sophie bites on Twitter: "python people: why might subprocess.Popen('wc -l', stdin=subprocess.PIPE, shell=True) sporadically throw "OSError: [Errno 9] Bad file descriptor"? Only happens sometimes. Google has been no help. (Most other people
![python - What difference between subprocess.call() and subprocess.Popen() makes PIPE less secure for the former? - Stack Overflow python - What difference between subprocess.call() and subprocess.Popen() makes PIPE less secure for the former? - Stack Overflow](https://i.stack.imgur.com/Y99ip.png)