[shelve] What are the limitations? Entering too many data crashes it on my machine!

"Martin v. Löwis" martin at v.loewis.de
Mon Dec 23 00:58:43 EST 2002


Tim Churches wrote:
> Yes, I had similar problems with shelve (as no doubt have many others who have 
> suffered in silence) - using Python 2.2.1 and 2.2.2 on a Red Hat Linux 6.2 
> system. The solution was to:
> 
> a) upgrade to BsdDb 3.3 from the SleepyCat site, and to pybsddb (the bsddb3 
> module).

I can see how this may solve the problem: earlier bsddb libraries had bugs.

> b) use shelve.BsdDbShelf() instead of just shelve(). 

I'm really surprised this was necessary. Franz Geiger reports that using 
BsdDb alone wasn't sufficient for him, either, but now I doubt whether 
he actually replaced the underlying DB with the bsddb3 that he had 
installed; AFAICT, the BsdDbShelf is really just a wrapper around a 
bsddb hash storage (by default), which offers a few additional functions 
over the standard shelf.

Regards,
Martin




More information about the Python-list mailing list