Tkinter ANSI color support

Lee Harr missive at frontiernet.net
Sat Aug 4 18:08:24 EDT 2001


I need to have a text frame in a Tkinter window that can display
color text as tagged by ANSI color codes.

My first pass was to parse the string in python, but that was _way_
too slow. So I wrote an extension module to parse the string and
pass back tuples of (tag, text) and that helps alot. But truth is
it is still too slow.

I am using a Tkinter.Text widget which has alot of very cool
functionality (ie, once the text is tagged, I could change the color
of ALL of that text with one command) which I will never use.
Maybe at this point I am just using the wrong display widget.

I hope I am not reinventing fire here. Any pointers?




More information about the Python-list mailing list