bsddb.dbshelve problem unpickling objects from another directory

Josiah Carlson jcarlson at
Mon Feb 2 00:40:11 CET 2004

BG wrote:

> I am experimenting with dbshelve in Python 2.3.3 on Win2k. The problem is
> that objects put into the dbshelve by a script in one directory cannot be
> unpickled by script running in another directory. Why?
> I am writing my own collection called testcollection to hold testitems. The
> testcollection uses dbshelve to store its items to disk. I want design a
> package called testmodules.

Pickled objects reference the module and the class from which they were 
created from.
When running testmodules/, testitem lives in in the module testitem.
When running, testitem lives in the module testmodules.testitem.

  - Josiah

More information about the Python-list mailing list