diff options
author | Guido van Rossum <guido@python.org> | 1994-08-08 08:03:24 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-08-08 08:03:24 +0000 |
commit | 6c46cafecb62a80b240e641a2eaf32eee9672124 (patch) | |
tree | bc9033042d6863cdbb98446f7454fa1f1b16a565 /Doc | |
parent | 00635929c9580e89008d3fcca3e5da0e92fc87c3 (diff) | |
download | cpython-6c46cafecb62a80b240e641a2eaf32eee9672124.tar.gz |
Added gdbm docs
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib.tex | 1 | ||||
-rw-r--r-- | Doc/lib/lib.tex | 1 | ||||
-rw-r--r-- | Doc/lib/libgdbm.tex | 30 | ||||
-rw-r--r-- | Doc/libgdbm.tex | 30 |
4 files changed, 62 insertions, 0 deletions
diff --git a/Doc/lib.tex b/Doc/lib.tex index 7b4f7246c5..72d09c4e03 100644 --- a/Doc/lib.tex +++ b/Doc/lib.tex @@ -74,6 +74,7 @@ language. \input{libunix} % UNIX ONLY \input{libdbm} \input{libfcntl} +\input{libgdbm} \input{libgrp} \input{libposix} \input{libposixfile} % XXX this uses lineii which partparse.py doesn't know diff --git a/Doc/lib/lib.tex b/Doc/lib/lib.tex index 7b4f7246c5..72d09c4e03 100644 --- a/Doc/lib/lib.tex +++ b/Doc/lib/lib.tex @@ -74,6 +74,7 @@ language. \input{libunix} % UNIX ONLY \input{libdbm} \input{libfcntl} +\input{libgdbm} \input{libgrp} \input{libposix} \input{libposixfile} % XXX this uses lineii which partparse.py doesn't know diff --git a/Doc/lib/libgdbm.tex b/Doc/lib/libgdbm.tex new file mode 100644 index 0000000000..40facad899 --- /dev/null +++ b/Doc/lib/libgdbm.tex @@ -0,0 +1,30 @@ +\section{Built-in Module \sectcode{gdbm}} +\bimodindex{gdbm} + +Gdbm provides python programs with an interface to the GNU \code{gdbm} +database library. Gdbm objects are of the mapping type, so they can be +handled just like objects of the built-in \dfn{dictionary} type, +except that keys and values are always strings, and printing a gdbm +object doesn't print the keys and values. + +The module is based on the Dbm module, modified to use GDBM instead. + +The module defines the following constant and functions: + +\renewcommand{\indexsubitem}{(in module gdbm)} +\begin{excdesc}{error} +Raised on gdbm-specific errors, such as I/O errors. \code{KeyError} is +raised for general mapping errors like specifying an incorrect key. +\end{excdesc} + +\begin{funcdesc}{open}{filename\, rwmode\, filemode} +Open a gdbm database and return a mapping object. \var{filename} is +the name of the database file, \var{rwmode} is \code{'r'}, \code{'w'}, +\code{'c'}, or \code{'n'} for reader, writer (this also gives read +access), create (writer, but create the database if it doesnt already +exist) and newdb (which will always create a new database). Only one +writer may open a gdbm file and many readers may open the file. Readers +and writers can not open the gdbm file at the same time. Note that the +\code{GDBM_FAST} mode of opening the database is not supported. \var{filemode} +is the unix mode of the file, used only when a database is created. +\end{funcdesc} diff --git a/Doc/libgdbm.tex b/Doc/libgdbm.tex new file mode 100644 index 0000000000..40facad899 --- /dev/null +++ b/Doc/libgdbm.tex @@ -0,0 +1,30 @@ +\section{Built-in Module \sectcode{gdbm}} +\bimodindex{gdbm} + +Gdbm provides python programs with an interface to the GNU \code{gdbm} +database library. Gdbm objects are of the mapping type, so they can be +handled just like objects of the built-in \dfn{dictionary} type, +except that keys and values are always strings, and printing a gdbm +object doesn't print the keys and values. + +The module is based on the Dbm module, modified to use GDBM instead. + +The module defines the following constant and functions: + +\renewcommand{\indexsubitem}{(in module gdbm)} +\begin{excdesc}{error} +Raised on gdbm-specific errors, such as I/O errors. \code{KeyError} is +raised for general mapping errors like specifying an incorrect key. +\end{excdesc} + +\begin{funcdesc}{open}{filename\, rwmode\, filemode} +Open a gdbm database and return a mapping object. \var{filename} is +the name of the database file, \var{rwmode} is \code{'r'}, \code{'w'}, +\code{'c'}, or \code{'n'} for reader, writer (this also gives read +access), create (writer, but create the database if it doesnt already +exist) and newdb (which will always create a new database). Only one +writer may open a gdbm file and many readers may open the file. Readers +and writers can not open the gdbm file at the same time. Note that the +\code{GDBM_FAST} mode of opening the database is not supported. \var{filemode} +is the unix mode of the file, used only when a database is created. +\end{funcdesc} |