Tkinter Text widget getting too slow

Changjune Kim juneaftn at REMOVETHIShanmail.net
Wed Sep 3 14:15:16 EDT 2003


"Jane Austine" <janeaustine50 at hotmail.com> wrote in message
news:ba1e306f.0309030713.ef2ec4a at posting.google.com...
> As you add more items, say text lines, in Text widget, it gets too
> slow and almost impractical to use on. Take idle for example. If the
> text gets bigger(e.g. print
> urllib.urlopen('http://www.amazon.com').read() ), it becomes too
> sluggish to use as an "interactive" shell.
>
> I have tried wxPython and it seems to have the same problem (from my
> experience using PyCrust).
>
> Is there any way to speed up Text widget, or should I look for another
> GUI library?
>
> Jane

Yes, it gets real slow. It happens quite often when a long single line is
shown on the window currently, like in your amazon html example.

Try this instead,

pprint(urllib.urlopen('http://www.amazon.com').readlines())

It won't get slow even when it's still on the screen; it inserts multiple
(short) lines. If you have to insert a lot of long lines, maybe you have to
look into WCK and customize it as Michael said in his posting to the
thread. (I'm interested to see his "extremely fast" text widget, too)

Best regards,

June Kim









More information about the Python-list mailing list