[pygtk] Hi, all! I'm new to the list. How can I create please a frontend for a TUI command?

A.T.Hofkamp a.t.hofkamp at tue.nl
Mon Oct 27 23:03:04 WST 2008


Néstor Amigo Cairo wrote:
> Hi!
> 
> I'm working in a GUI application as a frontend for some commands to
> copy some files into a Compact Flash. My question is: how can I
> execute the command from the GUI and show the output on a TextView
> inside the GUI application, line by line?? (the command is 'badblocks

In short:

launch the command, and feed the output handle into

gobject.io_add_watch()

you will get an event when something interesting (like arrival of new text) 
happens.

In the handler, read the data, and add it to your textview widget.


Albert


More information about the pygtk mailing list