save a dictionary in a file

Leif K-Brooks eurleif at ecritters.biz
Tue Nov 16 10:40:39 CET 2004


Mariano Draghi wrote:
> class PersistentDict(dict):
>     '''Persistent dictionary.
> 
>     It's a dictionary that saves and loads its data to a file.
>     '''

Sounds pretty similar to shelve 
(http://python.org/doc/lib/module-shelve.html) to me. Have you 
considered using it instead?



More information about the Python-list mailing list