Built-in Module dbm

dbm

The dbm module provides an interface to the (n)dbm library. Dbm objects behave like mappings (dictionaries), except that keys and values are always strings. Printing a dbm object doesn't print the keys and values, and the items() and values() methods are not supported.

See also the gdbm module, which provides a similar interface using the GNU GDBM library. gdbm

The module defines the following constant and functions:


\begin{excdesc}{error}
Raised on dbm-specific errors, such as I/O errors. \code{...
...aised for general mapping errors like specifying an incorrect key.
\end{excdesc}


\begin{funcdesc}{open}{filename\, \optional{flag\, \optional{mode}}}
Open a dbm ...
...the database has to be created. It defaults to octal
\code{0666}.
\end{funcdesc}