blob: 180504924cade66cfd9c8122d2af454ea9e574df [file] [log] [blame]
Guido van Rossum571391b1997-04-03 22:41:49 +00001\section{Standard Module \sectcode{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
Fred Drake19479911998-02-13 06:58:54 +00009\setindexsubitem{(in module whichdb)}
Guido van Rossum571391b1997-04-03 22:41:49 +000010\begin{funcdesc}{whichdb}{filename}
11Returns one of the following values: \code{None} if the file can't be
12opened because it's unreadable or doesn't exist; the empty string
13(\code{""}) if the file's format can't be guessed; or a string
14containing the required module name, such as \code{"dbm"} or
15\code{"gdbm"}.
16\end{funcdesc}
17