cpython/Doc/lib/libwhichdb.tex

20 lines
687 B
TeX

\section{\module{whichdb} ---
Guess which DBM module created a database}
\declaremodule{standard}{whichdb}
\modulesynopsis{Guess which DBM-style module created a given database.}
The single function in this module attempts to guess which of the
several simple database modules available--dbm, gdbm, or
dbhash--should be used to open a given file.
\begin{funcdesc}{whichdb}{filename}
Returns one of the following values: \code{None} if the file can't be
opened because it's unreadable or doesn't exist; the empty string
(\code{""}) if the file's format can't be guessed; or a string
containing the required module name, such as \code{"dbm"} or
\code{"gdbm"}.
\end{funcdesc}