Redirecting the output from sys.stdout
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.
[ Pieter Claerhout :: CreoScitex Response Centre :: Applications support ]
[ Pieter_Claerhout at creoscitex.com :: http://www.creoscitex.com/ ]
[ CreoScitex Europe :: Excelsiorlaan 21 :: 1930 Zaventem :: Belgium ]
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:
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/
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