O'Reilly logo

Python: Essential Reference, Third Edition by David Beazley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

dumbdbm

The dumbdbm module is a simple DBM-style database implemented in Python. It should only be used when no other DBM database modules are available.

open(filename [, flag [, mode]])

Opens the database file filename. Note that filename should not include a suffix such as .dat or .dir. The returned database object behaves like a dictionary, as described in the “Introduction” section earlier in this chapter.

error

Exception raised for database-related errors other than KeyError.

See Also

anydbm (p. 238), whichdb (p. 243)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required