(Using python 3.2 currently)
I need to be able to:
- Run a command using subprocess
- Both stdout/stderr of that command need be printed to the terminal in real-time (it doesn’t matter if they both come out on stdout or stderr or whatever
- At the same time, I need a way to know if the command printed anything to stderr (and preferably what it printed).
I’ve played around with subprocess pipes as well as doing strange pipe redirects in bash, as well as using tee, but as of yet haven’t found anything that would work. Is this something that’s possible?
My solution: