improve treatment of multi-line replies, ignore empty lines
[python/dscho.git] / Doc / libdbm.tex
blob7ff4ee52411947aa878a0c7b92c9bce85ed11765
1 \section{Built-in Module \sectcode{dbm}}
2 \bimodindex{dbm}
4 Dbm provides python programs with an interface to the unix \code{ndbm}
5 database library. Dbm objects are of the mapping type, so they can be
6 handled just like objects of the built-in \dfn{dictionary} type,
7 except that keys and values are always strings, and printing a dbm
8 object doesn't print the keys and values.
10 The module defines the following constant and functions:
12 \renewcommand{\indexsubitem}{(in module dbm)}
13 \begin{excdesc}{error}
14 Raised on dbm-specific errors, such as I/O errors. \code{KeyError} is
15 raised for general mapping errors like specifying an incorrect key.
16 \end{excdesc}
18 \begin{funcdesc}{open}{filename\, rwmode\, filemode}
19 Open a dbm database and return a mapping object. \var{filename} is
20 the name of the database file (without the \file{.dir} or \file{.pag}
21 extensions), \var{rwmode} is \code{'r'}, \code{'w'} or \code{'rw'} as for
22 \code{open}, and \var{filemode} is the unix mode of the file, used only
23 when the database has to be created.
24 \end{funcdesc}