PyDocs

Data Persistence

dbm.dumb

A dumb and slow but simple dbm clone.

For database spam, spam.dir contains the index (a text file),
spam.bak *may* contain a backup of the index (also a text file),
while spam.dat contains the data (a binary file).

XXX TO DO:

- seems to contain a bug when updating...

- reclaim free space (currently, space once occupied by deleted or expanded
items is not reused except if .reorganize() is called)

- support concurrent access (currently, if two processes take turns making
updates, they can mess up the index)

- support efficient access to large databases (currently, the whole index
is read when the database is opened, and some updates rewrite the whole index)
Symbols in dbm.dumb

d

dumbdbm.close
Close the database.
dumbdbm.reorganize
If you have carried out a lot of deletions and would like to shrink the space used on disk, this method will reorganize the database; otherwise, deleted file space will not be reused.
dumbdbm.sync
Synchronize the on-disk directory and data files.

e

error
Base class for I/O related errors.

o

open
Open the database file, filename, and return corresponding object.