os.system stdout redirection...
Terry Gray
tgray at cox-internet.com
Mon Aug 18 22:06:42 EDT 2003
Erwin S. Andreasen wrote:
> 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.
>
>
Thanks, exactly what I was looking for.
More information about the Python-list
mailing list