Jan-30-2022, 04:06 PM
(Jan-29-2022, 07:21 PM)bowlofred Wrote: I wonder if some of this is because the console is getting both stdin and stderr.
If you runhandbrake [options....] > /dev/null
do you get the output you're trying to ignore? If so, (and if you don't need the stderr information), then try addingstderr=subprocess.DEVNULL
to have that stream ignored.
If you do need to parse the stderr stream, then setting it tostderr=subprocess.STDOUT
should work to combine them.
I put the stderr stream inline with the stdout stream like shown above and that woked.
p = subprocess.Popen(command, stdout=subprocess.PIPE, text=True, stderr=subprocess.STDOUT)Is there any reason as to why its is hard to capture two or three streams? If you have any good resorces on the topic I would a greatly aprecate it if you could send them my way.