Redirect DOS command output

daryl_stultz at daryl_stultz at
Thu Feb 10 13:56:10 EST 2000

In article <87ura9$ib0$1 at>,
  daryl_stultz at wrote:
> Hey, I'm using os.system() to execute a DOS command (on an NT

After doing some more research, I came across win32pipe.popen() and that
did the trick.

import win32pipe

output = win32pipe.popen("dir", "r")

Just out of curiosity, is there a cross platform way to do the above?
Maybe using os.pipe ? thanks

Sent via
Before you buy.

More information about the Python-list mailing list