shelve crashing under Win ME

"Martin v. Löwis" martin at v.loewis.de
Sun Jul 1 05:45:42 EDT 2007


gluckj at gmail.com schrieb:
> OK, here's my workaround for shelve -- it's primitive and obviously
> much slower (it saves the entire dictionary each time), and you have
> to manually save -- BUT: it works...even on the Win ME machine. And
> it's possibly more universally portable in the long run than
> shelve...Also, once you open the dictionary, it is just as fast
> (perhaps faster?) than shelve for reading the contents (just not for
> saving...)

Notice that you don't need to use bsddb for shelve. Instead, you might
use dumbdbm instead, passing the dbm directly to shelve.Shelf. It's
probably slower than bsddb, however, updating a single key should be
faster than pickling an entire dictionary.

Regards,
Martin



More information about the Python-list mailing list