A tkinter kick-off

Doug Hellmann doughellmann at mindspring.com
Wed Jun 2 16:56:45 EDT 1999


Olivier Berger wrote:
> 
> My suggestion is then to have a finite state machine (simple to code if
> you use disctionnaries, lists and eval() ...) to interprete these
> inputs, then rendering them as you like in the window...
> 
> I'm myself writing such a tool, so this is only my actual experiments
> results... Maybe you can find allmost complete application frmaework
> elsewhere for such a "simple" tool...
> 

You might be intereseted in text widget I subclassed from
Pmw.ScrolledText.  You can map regular expressions to type styles when
you create the widget.  Then, when you want to run a shell command, you
give it the command (or sequence of commands).  The output is displayed
in the widget using the mappings to render each line appropriately
(right now it works on a line by line basis), based on the regular
expression that matches the string.  When the command (or sequence)
finishes, the widget will even call a callback to let you know.

Check out http://www.mindspring.com/~doughellmann/PmwContribD/ to
download the archive.

The widget in question is in PipeOutputWindow.py.

Doug




More information about the Python-list mailing list