python equivalent of the following program

Edward Elliott nobody at 127.0.0.1
Thu May 11 17:30:01 EDT 2006


Steven Bethard wrote:
> import subprocess
> 
> file1 = open('file1', 'w')
> prog1 = subprocess.Popen(['prog1'], stdout=file1)

And if the script runs somewhere that stderr is likely to disappear:

prog1 = subprocess.Popen(['prog1'], stdout=file1, stderr=subprocess.STDOUT)




More information about the Python-list mailing list