Redirecting the output from sys.stdout
Pieter Claerhout
PClaerhout at CREO.BE
Tue Apr 11 06:02:40 EDT 2000
Any examples on how to use the popen of the os module? Never used it before.
Kind regards,
Pieter
[ Pieter Claerhout :: CreoScitex Response Centre :: Applications support ]
[ Pieter_Claerhout at creoscitex.com :: http://www.creoscitex.com/ ]
[ CreoScitex Europe :: Excelsiorlaan 21 :: 1930 Zaventem :: Belgium ]
-----Original Message-----
From: Oleg Broytmann [mailto:phd at phd.russ.ru]
Sent: Tuesday, April 11, 2000 11:54 AM
To: Pieter Claerhout
Cc: 'python-list at python.org'
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:
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.
--
http://www.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list