I'm using popen to run a subprocess in python. I need to read each line the subprocess outputs as it is being outputted, rather then getting everything once the process terminates. I've tried everything I could find on Google with no success. Any help would be greatly appreciated.
Asked
Active
Viewed 249 times
1 Answers
1
The subprocess.Popen
documentation describes the available arguments to its call.
You want to set the bufsize
argument to 1
(line-buffered input/output).

tzot
- 92,761
- 29
- 141
- 204