
Tkinter code for formatted text in Text widget?
Quote:
Ken Mcdonald writes:
> Has anyone out there got a Python module (or something) to do simple
> formatted text to a Text widget? I'm thinking of something that
> understands some sort of simple markup language, and sets text in
> the widget accordingly. I just need to produce some decent-looking
> help windows. Easy enough to do on my own, but why reinvent the wheel?
Ken,
For basic formatting, check out formatter.py. This is device
independent; see Grail for a way to use HTML and a Tk text widget for
display. To avoid code bloat and feeping creaturism, you might be
able to produce a stripped-down version of Grail's Viewer.py and
sgml_lex/HTMLParser.py.
If you find this a useful approach, we'd like to hear about it and
what you had to do to separate these modules from Grail. Perhaps
simpler versions could be made available which would be more widely
useful.
-Fred
--
Fred L. Drake, Jr.
Corporation for National Research Initiatives
1895 Preston White Drive
Reston, VA 20191-5434