[pygtk] Show command output (new IEs4Linux GUI)

Brian dol-sen at telus.net
Thu Nov 30 15:10:58 WST 2006


On Thu, 2006-30-11 at 04:14 -0200, Internet Explorer Linux wrote:
> Hi everybody!
> 
> This is my first email to this list. My name is Sergio and I'm
> IEs4Linux project's main developer (maybe someone use my program :-)
> 
> I'm working on a pygtk user interface to my script. My GUI configures
> some things and run an executable (IEs4linux installer, written in
> bash). I need to open some kind of window to show the installer
> output. 
> 
> I tried with TextView, but I don't know how to make it non-blocking. I
> tried with Threads, but it waits until installer finishes to show the
> output on TextView. I searched on Google and got some pages talking
> about this (even with "solutions"), but I could not make it work. 
> 
> So, if anyone can help me with this thing I will be very thankful :-)
> 
> Sérgio Lopes
> From Brazil

You can check out our installer gui app.  The terminal is all python and
does compiler message filtering, etc.  There are 2 main areas that you
should look at for how we handle the textview updates.

1) in terminal/terminal.py update() where we process the text and update
the relevant textview buffers.

2) in readers/process_reader.py  which reads the virtual terminal output
(in a thread) and passes it back to the main gui for processing.

There are other ways of handling it as well, but that one works well for
us.  If you look around you will also find out how to autoscroll the
text as it is added, among other things.

The link: http://porthole.cvs.sourceforge.net/porthole/trunk/


-- 
Brian <dol-sen at telus.net>



More information about the pygtk mailing list