serialize dictionary type

Max M maxm at
Wed Aug 14 09:14:22 CEST 2002

Axel Bock wrote:

> this may be a stupid question, but all I need to bring my product to a
> somewhat useable state now is to know how I can save dictionaries into a
> database (mysql).
> to save it into a file would be sufficient as well :-))
> (as long as i can SAVE it somehow :^))

Look at::

7.8 anydbm -- Generic access to DBM-style databases

anydbm is a generic interface to variants of the DBM database -- dbhash 
(requires bsddb ), gdbm , or dbm . If none of these modules is 
installed, the slow-but-simple implementation in module dumbdbm will be 

This basically is a persistent dictionary that is saved in a file.

As far as I know the only limitation is that the keys must be strings.

regards Max M

More information about the Python-list mailing list