Problem with shelve

bluesmanu at bluesmanu at
Thu Nov 6 17:52:16 CET 2008

Hi all,

I am trying to use the shelve module to save an object of a 'Electron'
class I made into a file. The writing goes well but the reading goes :

>>> e=f['0']
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "", line 113, in __getitem__
    value = Unpickler(f).load()
AttributeError: 'module' object has no attribute 'Electron'

any idea of what I am doing wrong?


More information about the Python-list mailing list