Fast text display?

Jp Calderone exarkun at
Wed Jun 8 23:43:03 CEST 2005

On Wed, 08 Jun 2005 14:15:35 -0400, Christopher Subich <spam.csubich+block at> wrote:
>As a hobby project, I'm writing a MUD client -- this scratches an itch,
>and is also a good excuse to become familiar with the Python language.
>I have a conceptual handle on most of the implementation, but the
>biggest unknown for me is the seemingly trivial matter of text display.
>My first requirement is raw speed; none of what I'm doing is
>processing-intensive, so Python itself shouldn't be a problem here.  But
>still, it's highly desirable to have very fast text updates (text
>inserted only at the end)-- any slower than 20ms/line stretches
>usability for fast-scrolling.  EVERY other action on the text display,
>though, like scrolling backwards or text selection, can be orders of
>magnitude slower.
>The second requirement is that it support text coloration.  The exact
>markup method isn't important, just so long as individual characters can
>be independently colored.
>The third requirement is cross-platform-osity; if you won't hold it
>against me I'll tell you that I'm developing under Cygwin in Win2k, but
>I'd really like it if the app could run under 'nix and mac-osx also.

I've done this with Tkinter before.  At the time, I surveyed the various toolkits for the quality of their text widgets, and of Tkinter, PyGTK, PyQT, and wxPython, only Tkinter could satisfy the performance requirements.  This was about three years ago, so the field may have changed.

If you like, you can check out the code:

As MUD clients go, it's pretty weak, but it solves the text display problem pretty decently.

Hope this helps,


More information about the Python-list mailing list