bsddb.dbshelve problem unpickling objects from another directory
Josiah Carlson
jcarlson at nospam.uci.edu
Mon Feb 2 18:44:08 EST 2004
> Thank you for your quick answer. But, this very much limits the way
> persistent objects can be used. Objects can apparently only be used in the
> context they were created. There is a logic to this, but it is also strange
> to me. Is there a way that upickled objects can also be used outside there
> original context?
I don't know. If I were put into a situation like that, I'd probably
just go and do this where necessary:
import sys
sys.path.append('<path to database module>')
import testmodule
#etcetera
Sure, it mangles paths, but then everything has the same context and
will work.
- Josiah
More information about the Python-list
mailing list