append subprocess.Popen output to file?
You sure can append the output of subprocess.Popen to a file, and I make a daily use of it. Here’s how I do it: log = open(‘some file.txt’, ‘a’) # so that data written to it will be appended c = subprocess.Popen([‘dir’, ‘/p’], stdout=log, stderr=log, shell=True) (of course, this is a dummy example, I’m not … Read more