Redirecting the output from sys.stdout

Oleg Broytmann phd at phd.russ.ru
Tue Apr 11 05:54:12 EDT 2000


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:
   http://sun.med.ru/~phd/Software/Python/
Look for dospopen. These patches are now obsolete, I don't know how well
it'd fitted you.

Faster mirrors: http://members.xoom.com/phd2.1/Software/Python/
http://www.fortunecity.com/skyscraper/unix/797/Software/Python/

Oleg.
---- 
    Oleg Broytmann    http://members.xoom.com/phd2.1/    phd2 at earthling.net
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list