Crawling Python

MK mark at _spamspamlovelyspam_btweng.krakow.pl
Thu Jun 17 17:10:10 EDT 1999


Hello everyone,

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
>>> import anydbm
>>> d=anydbm.open('c:\\any.db','n')
>>> for i in range(1000):
	d[`i`]=`range(i,i+10)`
	
	
>>> d.close()
>>> 
>>> d=anydbm.open('c:\\any.db')
>>> s=''
>>> for i in d.keys():
	s=s+d[i]
	
	
>>> 
>>> 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. It responded to a command once and then it
hang indefinitely. Techically it does not crash, but it displays a prompt,
accepts command and processes it for minutes for some unfathomable reason.
Curioser and curioser, I have said to myself. Can't I have ~50K strings without
Python crawling? I thought that unlike in other cases crawling was not max
performance for _this_ kind of animal?



v----e----r----y------s---l---o----w-----l----y------y'rs


PS. I have tried the same thing in DOS executable -- above does not happen.
Looks like only IDLE is affected. This is second feature, err, bug I have
found in IDLE. Maybe somebody is willing to give me a job? ;-)))








MK


--------------------------------------------------
Reality is something that does not disappear after 
you cease believing in it - VALIS, Philip K. Dick
--------------------------------------------------

Delete _spamspamlovelyspam_ from address to email me

postmaster at 127.0.0.1
root at 127.0.0.1
webmaster at 127.0.0.1







More information about the Python-list mailing list