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.
1 Answer
The subprocess.Popen documentation describes the available arguments to its call.
You want to set the bufsize argument to 1 (line-buffered input/output).