Re: importing class objects from a pickled file

2011-05-04 Thread Gregory Ewing
Catherine Moroney wrote: I am having some problems reading the object back out, as I get complaints about "unable to import module X". The only way I have found around it is to run the read-file code out of the same directory that contains the X.py file Even when I put statements into the c

Re: importing class objects from a pickled file

2011-05-03 Thread Owen Jacobson
On 2011-05-03 20:18:33 -0400, Catherine Moroney said: Hello, I have an object of class X that I am writing to a pickled file. The pickling part goes fine, but I am having some problems reading the object back out, as I get complaints about "unable to import module X". The only way I have f

Re: importing class objects from a pickled file

2011-05-03 Thread James Mills
On Wed, May 4, 2011 at 10:18 AM, Catherine Moroney wrote: > Am I explaining myself properly?  Why doesn't the code that loads the > object from the pickled file work unless I am sitting in the same directory? >   The code that writes the pickled file has the statement > "from Y.X import X" stateme

importing class objects from a pickled file

2011-05-03 Thread Catherine Moroney
Hello, I have an object of class X that I am writing to a pickled file. The pickling part goes fine, but I am having some problems reading the object back out, as I get complaints about "unable to import module X". The only way I have found around it is to run the read-file code out of the