pygtk and long running process

Robert zolkos+newsgroups at gmail.com
Mon Apr 25 14:12:19 EDT 2005


On Sun, 24 Apr 2005 19:46:52 -0600, Daniel Cer wrote:

> Daniel Cer wrote:
>> Robert wrote:
>> 
>>> I have a command line app that can take up to 20 minutes to complete and
>>> every minute or so updates it's status (spits it out to console).  I am
>>> writing a front end for this app in python/gtk and was wondering what
>>> command I use to a) invoke the command and b) how to capture it's out put
>>> and for instance update a text box.
>> 
>> 
>> os.popen() will probably do what you want.
>> 
>> e.g.:
> 
> (....)
> 
> As for the latter part of (b)....
> 
> I don't know much about pygtk, but I imagine you should be able to put 
> the code that monitors the external program in a thread, and then 
> whenever you get some new status information update the text box.
> 
> -Dan

Thanks for your help




More information about the Python-list mailing list