Issue 47222: subprocess.Popen() should allow capturing output and sending it to stdout and stderr (original) (raw)
I'd like to see handlers exposes for the stdout and stderr pipe-reading threads so that I could customize what's done with the data as it's read.
I might, for instance, want to:
(1) accumulate it into a buffer; (2) copy it onto sys.stdout or sys.stderr, respectively; (3) send it to a logging object;
or some combination of the above, possibly all of them.