os.system stdout redirection...
Erwin S. Andreasen
erwin at andreasen.com
Mon Aug 18 07:01:13 EDT 2003
Terry Gray <tgray at cox-internet.com> writes:
> Using Python 2.2 in Debian linuxI am trying to change to a different
> directory, execute a 'make all' command, and redirect the output of
> the subshell to a PyQt window... I should be able to execute the
> os.system('cd newdirectory; make all'), but how do I redirect stdout
> of the new subshell created by the os.system call?
If you are going to use QT, Use QProcess. You can set it up to fire
off a signal when new output has arrived and then read it and update
your window.
--
===============================================================
<erwin at andreasen.org> Herlev, Denmark
<URL:http://www.andreasen.org/> <*>
===============================================================
More information about the Python-list
mailing list