Crawling Python

Tim Peters tim_one at
Fri Jun 18 02:02:39 CEST 1999

> While playing with anydbm module using IDLE 0.4, I have made
> Python to do the following:
> Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> [... a bunch of code building a long string ...]
> >>> len(s)
> 49035
> >>>
> Then I tried was typing s only to see the string. Shell printed
> it after some 20 seconds, and then came to a crawl.

I've noticed that too.  Don't know whether it's the IDLE code or the Tk Text
widget that's unhappy.  Probably both; e.g., IDLE spends a lot of time
syntax-coloring the junk, and the Tk Text docs warn that long lines can be

Everything speeds up back to normal if you simply delete the giant string
from the window.

> ...
> PS. I have tried the same thing in DOS executable -- above does
> not happen.

Sure, and in return none of IDLE's history, undo/redo, searching, replacing,
scrolling or editing cmds work in a DOS box either <wink>.

adaptively y'rs  - tim

More information about the Python-list mailing list