winnt win32process.createProcess with stdout to file ?

Peter Hansen peter at engcorp.com
Thu Mar 3 18:45:02 EST 2005


david.humpherys at gmail.com wrote:
> os:winnt
> python2.3.2
> 
> I have a exe that dumps info to the command line.  I want to run this
> process and  capture the stdout into a file.  I think i'm close... any
> help appreciated.

Use the standard "subprocess" module that comes in Python2.4.

Or, if you can't upgrade for some reason, it sounds to me
like os.popen() will do what you want... that's the older
standard technique.

No need to resort to lots of win32 stuff.

-Peter



More information about the Python-list mailing list