[pygtk] Asynchronous access at output of os.popen() call
Pádraig Brady
P at draigBrady.com
Wed Aug 20 19:09:23 WST 2008
A.T.Hofkamp wrote:
> Pádraig Brady wrote:
>> togix wrote:
>>> Hi,
>>> I'm working on a GUI in PyGTK that allows to insert some parameters and then to call a program (written in C) using the os.popen() function.
>>>
>>> The thing that I want to do is redirect the standard output of the called program into a gtk.TextView() box [b]in runtime[/b],
>>> so to show the lines when they come out in a asynchronous way, not all the end of execution.
>> Yes there are 2 issues here.
>> The first is that os.popen() doesn't return until the subprocess is finished.
>
> This is not true at my Linux platform:
Sorry you're right.
I meant that iterating over the os.popen()
file object will not complete until the subprocess has finished.
Pádraig.
More information about the pygtk
mailing list