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