blob: 2caace28c1c3cce6bcd01b1d0af732d229f18f4b [file] [log] [blame]
Fred Drake3a0351c1998-04-04 07:23:21 +00001\section{Standard Module \module{whichdb}}
Guido van Rossume47da0a1997-07-17 16:34:52 +00002\label{module-whichdb}
Guido van Rossum571391b1997-04-03 22:41:49 +00003\stmodindex{whichdb}
4
5The single function in this module attempts to guess which of the
6several simple database modules available--dbm, gdbm, or
7dbhash--should be used to open a given file.
8
Guido van Rossum571391b1997-04-03 22:41:49 +00009\begin{funcdesc}{whichdb}{filename}
10Returns one of the following values: \code{None} if the file can't be
11opened because it's unreadable or doesn't exist; the empty string
12(\code{""}) if the file's format can't be guessed; or a string
13containing the required module name, such as \code{"dbm"} or
14\code{"gdbm"}.
15\end{funcdesc}
16