bsddb.dbshelve problem unpickling objects from another directory
BG
nomail
Tue Feb 3 03:02:36 EST 2004
Josiah,
I tried what you suggested and indeed it works perfectly! Thank you very
much for your help!
Berry
"Josiah Carlson" <jcarlson at nospam.uci.edu> schreef in bericht
news:bvmngg$9r0$3 at news.service.uci.edu...
> > 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