February 2006
Intermediate to advanced
648 pages
14h 53m
English
The dbm module provides an interface to the UNIX dbm library.
open(filename [, flag=’r’ [, mode]])Opens a dbm database and returns a dbm object. Here, filename is the name of the database file (without the .dir or .pag extension). The returned object behaves like a dictionary, as described in the “Introduction” section earlier in this chapter.
errorException raised for dbm-specific errors other than KeyError.
Note
This module should work with a variety of different UNIX databases, including ndbm databases, BSD DB compatibility interfaces, and the GNU GDBM compatibility interface.