In my Python 3 script I am starting another program that normally prints out what its doing as its doing if I don't capture the output with PIPE such as below:
proc = subprocess.run("program")
But when I do capture the output for saving to a text file with:
proc = subprocess.run("program", stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
it no longer prints out as the subprocess is running but does capture the output for saving to a text file. Is there a way to have the program print to the screen and capture that output. I have read through subprocess but I cannot figure out a way to do so.