Redirecting the output from sys.stdout

Pieter Claerhout PClaerhout at CREO.BE
Tue Apr 11 12:02:40 CEST 2000

Any examples on how to use the popen of the os module? Never used it before.

Kind regards,


[ Pieter Claerhout :: CreoScitex Response Centre :: Applications support ]
[ Pieter_Claerhout at    :: ]
[ CreoScitex Europe  ::   Excelsiorlaan 21   ::  1930 Zaventem  :: Belgium ]

-----Original Message-----
From: Oleg Broytmann [mailto:phd at]
Sent: Tuesday, April 11, 2000 11:54 AM
To: Pieter Claerhout
Cc: 'python-list at'
Subject: Re: Redirecting the output from sys.stdout

On Tue, 11 Apr 2000, Pieter Claerhout wrote:
> I want to run a DOS command from Python, and I want to redirect the output of
> that command to a variable. Anyone a suggestion on how to accomplish this? The
> output of the command should not be shown on the screen.

   Long time ago I wrote a version of popen for DOS. If popen is not
available in your version of module os - download it here:
Look for dospopen. These patches are now obsolete, I don't know how well
it'd fitted you.

Faster mirrors:

    Oleg Broytmann    phd2 at
           Programmers don't die, they just GOSUB without RETURN.


More information about the Python-list mailing list