[Tutor] capturing os.system() output
alan.gauld@bt.com
alan.gauld@bt.com
Tue, 8 Oct 2002 17:24:53 +0100
> All right, I know this is probably very basic, but how would
> I capture the output of an os.system() call, instead of having
> it print to standard output immediately?
Use os.popen instead
There are several variants woith subtle differences, read the
docs to pick the right one. I usually use popen2()
- for reasons which escape me! :-)
Alan g.
Author of the 'Learning to Program' web site
http://www.freenetpages.co.uk/hp/alan.gauld