[IPython-dev] SVN testers?

Fernando Perez Fernando.Perez at colorado.edu
Fri Jan 20 12:55:22 EST 2006

Ville Vainio wrote:
> On 1/20/06, Fernando Perez <Fernando.Perez at colorado.edu> wrote:
>>It seems that instances of classes defined interactively can't be %stored.
> True. I changed %store to complain when trying to store such objects. In SVN.

Is it fixable?  It certainly doesn't work even for plain python:

 >>> class foo: pass
 >>> pickle.dump(foo,file('foo.pkl','w'))

[new session]

 >>> foo = pickle.load(file('foo.pkl'))
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/usr/lib/python2.3/pickle.py", line 1390, in load
     return Unpickler(file).load()
   File "/usr/lib/python2.3/pickle.py", line 872, in load
   File "/usr/lib/python2.3/pickle.py", line 1104, in load_global
     klass = self.find_class(module, name)
   File "/usr/lib/python2.3/pickle.py", line 1140, in find_class
     klass = getattr(mod, name)
AttributeError: 'module' object has no attribute 'foo'

So it's not an ipython regression re. plain python.  But it would be nice at 
some point to come up with some namespace trick that helps here.  Oh well, 
let's not worry abou this for now.  Thahks for putting the warning in, better 
than failing upon reload later.



More information about the IPython-dev mailing list