Re: Call external programs and keep showing its outputs



Il 10/10/2013 06:55, Woody Wu ha scritto:
Hi,

I am about to write a test runner with GTK+. It basically can list a lot
of external test programs (non-GTK+ pure Linux apps) in a treeview and
let user select one of them to run. While an external program is
running, I want to get all its outputs (to stdout/stderr) and keep
updating in a textview.

Since I am a Linux programmer, so I know how to fork a new process and
pipe into an external program. But I don't know in GTK+, what's the
right method to keep fetching the information from the pipe and showing
them in my GUI widgets.  On the other hand, while an external program is
running, I don't want user feel that the my program is frozing and user
should be able to kill the running external program by clicking a 'stop'
button on the GUI.

For this kind of task, what GTK+ technology I should go to grab?  Thanks
in advance!


Hope you like pyhton :)


-- 
Hofstadter's Law:
"It always takes longer than you expect, even when you take into account
Hofstadter's Law."

Attachment: test_pygtk.ui
Description: application/designer

Attachment: test_pygtk.py
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]