summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libaifc.tex6
-rw-r--r--Doc/lib/libal.tex12
-rw-r--r--Doc/lib/liballos.tex28
-rw-r--r--Doc/lib/libamoeba.tex6
-rw-r--r--Doc/lib/libanydbm.tex12
-rw-r--r--Doc/lib/libarray.tex6
-rw-r--r--Doc/lib/libaudioop.tex6
-rw-r--r--Doc/lib/libbase64.tex6
-rw-r--r--Doc/lib/libbasehttp.tex6
-rw-r--r--Doc/lib/libbastion.tex6
-rw-r--r--Doc/lib/libbinascii.tex7
-rw-r--r--Doc/lib/libbinhex.tex6
-rw-r--r--Doc/lib/libbisect.tex6
-rw-r--r--Doc/lib/libbltin.tex6
-rw-r--r--Doc/lib/libcalendar.tex6
-rw-r--r--Doc/lib/libcd.tex6
-rw-r--r--Doc/lib/libcgi.tex7
-rw-r--r--Doc/lib/libcmath.tex6
-rw-r--r--Doc/lib/libcmd.tex7
-rw-r--r--Doc/lib/libcode.tex6
-rw-r--r--Doc/lib/libcommands.tex6
-rw-r--r--Doc/lib/libcopy.tex6
-rw-r--r--Doc/lib/libcopyreg.tex16
-rw-r--r--Doc/lib/libcrypt.tex6
-rw-r--r--Doc/lib/libcrypto.tex13
-rw-r--r--Doc/lib/libdbm.tex6
-rw-r--r--Doc/lib/libdis.tex6
-rw-r--r--Doc/lib/liberrno.tex6
-rw-r--r--Doc/lib/libexcs.tex1
-rw-r--r--Doc/lib/libfcntl.tex6
-rw-r--r--Doc/lib/libfileinput.tex7
-rw-r--r--Doc/lib/libfl.tex18
-rw-r--r--Doc/lib/libfm.tex6
-rw-r--r--Doc/lib/libfnmatch.tex6
-rw-r--r--Doc/lib/libformatter.tex6
-rw-r--r--Doc/lib/libftplib.tex6
-rw-r--r--Doc/lib/libgdbm.tex6
-rw-r--r--Doc/lib/libgetopt.tex6
-rw-r--r--Doc/lib/libgl.tex37
-rw-r--r--Doc/lib/libglob.tex6
-rw-r--r--Doc/lib/libgopherlib.tex6
-rw-r--r--Doc/lib/libgrp.tex6
-rw-r--r--Doc/lib/libgzip.tex6
-rw-r--r--Doc/lib/libhtmllib.tex6
-rw-r--r--Doc/lib/libhttplib.tex6
-rw-r--r--Doc/lib/libimageop.tex6
-rw-r--r--Doc/lib/libimaplib.tex6
-rw-r--r--Doc/lib/libimgfile.tex6
-rw-r--r--Doc/lib/libimghdr.tex6
-rw-r--r--Doc/lib/libimp.tex6
-rw-r--r--Doc/lib/libjpeg.tex6
-rw-r--r--Doc/lib/libkeyword.tex6
-rw-r--r--Doc/lib/liblocale.tex6
-rw-r--r--Doc/lib/libmailbox.tex6
-rw-r--r--Doc/lib/libmailcap.tex6
-rw-r--r--Doc/lib/libmain.tex6
-rw-r--r--Doc/lib/libmarshal.tex7
-rw-r--r--Doc/lib/libmath.tex6
-rw-r--r--Doc/lib/libmd5.tex6
-rw-r--r--Doc/lib/libmimetools.tex6
-rw-r--r--Doc/lib/libmimetypes.tex6
-rw-r--r--Doc/lib/libmimify.tex6
-rw-r--r--Doc/lib/libmisc.tex27
-rw-r--r--Doc/lib/libmm.tex23
-rw-r--r--Doc/lib/libmpz.tex6
-rw-r--r--Doc/lib/libmultifile.tex6
-rw-r--r--Doc/lib/libni.tex6
-rw-r--r--Doc/lib/libnntplib.tex6
-rw-r--r--Doc/lib/liboperator.tex6
-rw-r--r--Doc/lib/libos.tex6
-rw-r--r--Doc/lib/libpanel.tex18
-rw-r--r--Doc/lib/libparser.tex7
-rw-r--r--Doc/lib/libpdb.tex6
-rw-r--r--Doc/lib/libpickle.tex12
-rw-r--r--Doc/lib/libpopen2.tex6
-rw-r--r--Doc/lib/libpoplib.tex6
-rw-r--r--Doc/lib/libposix.tex7
-rw-r--r--Doc/lib/libposixfile.tex6
-rw-r--r--Doc/lib/libppath.tex5
-rw-r--r--Doc/lib/libpprint.tex6
-rw-r--r--Doc/lib/libprofile.tex6
-rw-r--r--Doc/lib/libpwd.tex6
-rw-r--r--Doc/lib/libpython.tex78
-rw-r--r--Doc/lib/libqueue.tex6
-rw-r--r--Doc/lib/libquopri.tex6
-rw-r--r--Doc/lib/librand.tex6
-rw-r--r--Doc/lib/librandom.tex6
-rw-r--r--Doc/lib/libre.tex6
-rw-r--r--Doc/lib/libregex.tex6
-rw-r--r--Doc/lib/libregsub.tex6
-rw-r--r--Doc/lib/libresource.tex7
-rw-r--r--Doc/lib/librestricted.tex10
-rw-r--r--Doc/lib/librexec.tex6
-rw-r--r--Doc/lib/librfc822.tex6
-rw-r--r--Doc/lib/librgbimg.tex7
-rw-r--r--Doc/lib/librotor.tex6
-rw-r--r--Doc/lib/libselect.tex6
-rw-r--r--Doc/lib/libsgi.tex2
-rw-r--r--Doc/lib/libsgmllib.tex6
-rw-r--r--Doc/lib/libshelve.tex6
-rw-r--r--Doc/lib/libsignal.tex6
-rw-r--r--Doc/lib/libsite.tex6
-rw-r--r--Doc/lib/libsmtplib.tex6
-rw-r--r--Doc/lib/libsocket.tex6
-rw-r--r--Doc/lib/libsocksvr.tex6
-rw-r--r--Doc/lib/libsomeos.tex35
-rw-r--r--Doc/lib/libsoundex.tex6
-rw-r--r--Doc/lib/libstat.tex7
-rw-r--r--Doc/lib/libstdwin.tex18
-rw-r--r--Doc/lib/libstring.tex6
-rw-r--r--Doc/lib/libstrings.tex25
-rw-r--r--Doc/lib/libstrio.tex12
-rw-r--r--Doc/lib/libstruct.tex6
-rw-r--r--Doc/lib/libsunaudio.tex6
-rw-r--r--Doc/lib/libsymbol.tex6
-rw-r--r--Doc/lib/libsys.tex25
-rw-r--r--Doc/lib/libsyslog.tex6
-rw-r--r--Doc/lib/libtempfile.tex6
-rw-r--r--Doc/lib/libtemplate.tex26
-rw-r--r--Doc/lib/libtermios.tex12
-rw-r--r--Doc/lib/libthread.tex6
-rw-r--r--Doc/lib/libthreading.tex6
-rw-r--r--Doc/lib/libtime.tex6
-rw-r--r--Doc/lib/libtoken.tex6
-rw-r--r--Doc/lib/libtraceback.tex6
-rw-r--r--Doc/lib/libtypes2.tex6
-rw-r--r--Doc/lib/libunix.tex52
-rw-r--r--Doc/lib/liburllib.tex6
-rw-r--r--Doc/lib/liburlparse.tex7
-rw-r--r--Doc/lib/libuser.tex6
-rw-r--r--Doc/lib/libuserdict.tex12
-rw-r--r--Doc/lib/libuu.tex6
-rw-r--r--Doc/lib/libwhichdb.tex6
-rw-r--r--Doc/lib/libwhrandom.tex6
-rw-r--r--Doc/lib/libwww.tex95
-rw-r--r--Doc/lib/libxdrlib.tex8
-rw-r--r--Doc/lib/libxmllib.tex6
-rw-r--r--Doc/lib/libzlib.tex6
-rw-r--r--Doc/templates/module.tex26
139 files changed, 628 insertions, 707 deletions
diff --git a/Doc/lib/libaifc.tex b/Doc/lib/libaifc.tex
index f86b1d8..d7433e7 100644
--- a/Doc/lib/libaifc.tex
+++ b/Doc/lib/libaifc.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{aifc}}
-\label{module-aifc}
-\stmodindex{aifc}
+\declaremodule{standard}{aifc}
+
+\modulesynopsis{Read and write audio files in AIFF or AIFC format.}
+
This module provides support for reading and writing AIFF and AIFF-C
files. AIFF is Audio Interchange File Format, a format for storing
diff --git a/Doc/lib/libal.tex b/Doc/lib/libal.tex
index ed675a9..8b9a8f8 100644
--- a/Doc/lib/libal.tex
+++ b/Doc/lib/libal.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{al}}
-\label{module-al}
-\bimodindex{al}
+\declaremodule{builtin}{al}
+
+\modulesynopsis{Audio functions on the SGI.}
+
This module provides access to the audio facilities of the SGI Indy
and Indigo workstations. See section 3A of the IRIX man pages for
@@ -160,8 +162,10 @@ Get status information on last error.
\section{Standard Module \module{AL}}
-\nodename{AL (uppercase)}
-\stmodindex{AL}
+\declaremodule{standard}{AL}
+
+\modulesynopsis{Constants used with the \module{al} module.}
+
This module defines symbolic constants needed to use the built-in
module \module{al} (see above); they are equivalent to those defined
diff --git a/Doc/lib/liballos.tex b/Doc/lib/liballos.tex
index fca7567..6def149 100644
--- a/Doc/lib/liballos.tex
+++ b/Doc/lib/liballos.tex
@@ -7,30 +7,4 @@ such as files and a clock. The interfaces are generally modelled
after the \UNIX{} or \C{} interfaces but they are available on most
other systems as well. Here's an overview:
-\begin{description}
-
-\item[os]
---- Miscellaneous OS interfaces.
-
-\item[time]
---- Time access and conversions.
-
-\item[getopt]
---- Parser for command line options.
-
-\item[tempfile]
---- Generate temporary file names.
-
-\item[errno]
---- Standard errno system symbols.
-
-\item[glob]
---- \UNIX{} shell style pathname pattern expansion.
-
-\item[fnmatch]
---- \UNIX{} shell style pathname pattern matching.
-
-\item[locale]
---- Internationalization services.
-
-\end{description}
+\localmoduletable
diff --git a/Doc/lib/libamoeba.tex b/Doc/lib/libamoeba.tex
index 0d3df2b..e59b487 100644
--- a/Doc/lib/libamoeba.tex
+++ b/Doc/lib/libamoeba.tex
@@ -1,8 +1,10 @@
\chapter{Amoeba Specific Services}
\section{Built-in Module \module{amoeba}}
-\label{module-amoeba}
-\bimodindex{amoeba}
+\declaremodule{builtin}{amoeba}
+
+\modulesynopsis{None}
+
This module provides some object types and operations useful for
Amoeba applications. It is only available on systems that support
diff --git a/Doc/lib/libanydbm.tex b/Doc/lib/libanydbm.tex
index bba7714..745605a 100644
--- a/Doc/lib/libanydbm.tex
+++ b/Doc/lib/libanydbm.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{anydbm}}
-\label{module-anydbm}
-\stmodindex{anydbm}
+\declaremodule{standard}{anydbm}
+
+\modulesynopsis{Generic interface to DBM-style database modules.}
+
\module{anydbm} is a generic interface to variants of the DBM
database --- \module{dbhash}\refbimodindex{dbhash},
@@ -45,8 +47,10 @@ strings.
\section{Standard Module \module{dumbdbm}}
-\label{module-dumbdbm}
-\stmodindex{dumbdbm}
+\declaremodule{standard}{dumbdbm}
+
+\modulesynopsis{None}
+
A simple and slow database implemented entirely in Python. This
should only be used when no other DBM-style database is available.
diff --git a/Doc/lib/libarray.tex b/Doc/lib/libarray.tex
index 180be34..4c8b5f2 100644
--- a/Doc/lib/libarray.tex
+++ b/Doc/lib/libarray.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{array}}
-\label{module-array}
-\bimodindex{array}
+\declaremodule{builtin}{array}
+
+\modulesynopsis{Efficient arrays of uniformly typed numeric values.}
+
\index{arrays}
This module defines a new object type which can efficiently represent
diff --git a/Doc/lib/libaudioop.tex b/Doc/lib/libaudioop.tex
index 774a92e..5081a60 100644
--- a/Doc/lib/libaudioop.tex
+++ b/Doc/lib/libaudioop.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{audioop}}
-\label{module-audioop}
-\bimodindex{audioop}
+\declaremodule{builtin}{audioop}
+
+\modulesynopsis{Manipulate raw audio data.}
+
The \module{audioop} module contains some useful operations on sound
fragments. It operates on sound fragments consisting of signed
diff --git a/Doc/lib/libbase64.tex b/Doc/lib/libbase64.tex
index a9c3bd1..2d34e1d 100644
--- a/Doc/lib/libbase64.tex
+++ b/Doc/lib/libbase64.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{base64}}
-\label{module-base64}
-\stmodindex{base64}
+\declaremodule{standard}{base64}
+
+\modulesynopsis{Encode/decode binary files using the MIME base64 encoding.}
+
\indexii{base64}{encoding}
\index{MIME!base64 encoding}
diff --git a/Doc/lib/libbasehttp.tex b/Doc/lib/libbasehttp.tex
index 7ee55df..df04202 100644
--- a/Doc/lib/libbasehttp.tex
+++ b/Doc/lib/libbasehttp.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{BaseHTTPServer}}
-\label{module-BaseHTTPServer}
-\stmodindex{BaseHTTPServer}
+\declaremodule{standard}{BaseHTTPServer}
+
+\modulesynopsis{Basic HTTP server (base class for SimpleHTTPServer and CGIHTTPServer).}
+
\indexii{WWW}{server}
\indexii{HTTP}{protocol}
diff --git a/Doc/lib/libbastion.tex b/Doc/lib/libbastion.tex
index ddf6d9e..08b435d 100644
--- a/Doc/lib/libbastion.tex
+++ b/Doc/lib/libbastion.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{Bastion}}
-\label{module-Bastion}
-\stmodindex{Bastion}
+\declaremodule{standard}{Bastion}
+
+\modulesynopsis{Providing restricted access to objects.}
+
% I'm concerned that the word 'bastion' won't be understood by people
% for whom English is a second language, making the module name
diff --git a/Doc/lib/libbinascii.tex b/Doc/lib/libbinascii.tex
index 77366ed..8b72fd7 100644
--- a/Doc/lib/libbinascii.tex
+++ b/Doc/lib/libbinascii.tex
@@ -1,6 +1,9 @@
\section{Built-in Module \module{binascii}}
-\label{module-binascii}
-\bimodindex{binascii}
+\declaremodule{builtin}{binascii}
+
+\modulesynopsis{Tools for converting between binary and various ascii-encoded binary
+representation}
+
The \module{binascii} module contains a number of methods to convert
between binary and various \ASCII{}-encoded binary
diff --git a/Doc/lib/libbinhex.tex b/Doc/lib/libbinhex.tex
index 6a7d3c6..782a272 100644
--- a/Doc/lib/libbinhex.tex
+++ b/Doc/lib/libbinhex.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{binhex}}
-\label{module-binhex}
-\stmodindex{binhex}
+\declaremodule{standard}{binhex}
+
+\modulesynopsis{Encode and decode files in binhex4 format.}
+
This module encodes and decodes files in binhex4 format, a format
allowing representation of Macintosh files in \ASCII{}. On the Macintosh,
diff --git a/Doc/lib/libbisect.tex b/Doc/lib/libbisect.tex
index 81cb550..14f8027 100644
--- a/Doc/lib/libbisect.tex
+++ b/Doc/lib/libbisect.tex
@@ -3,8 +3,10 @@
% <arw@pythonpros.com>.
\section{Standard Module \module{bisect}}
-\stmodindex{bisect}
-\label{module-bisect}
+\declaremodule{standard}{bisect}
+
+\modulesynopsis{None}
+
This module provides support for maintaining a list in sorted order
diff --git a/Doc/lib/libbltin.tex b/Doc/lib/libbltin.tex
index a4a0dd0..3c5dad4 100644
--- a/Doc/lib/libbltin.tex
+++ b/Doc/lib/libbltin.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{__builtin__}}
-\label{module-builtin}
-\bimodindex{__builtin__}
+\declaremodule[builtin]{builtin}{__builtin__}
+
+\modulesynopsis{The set of built-in functions.}
+
This module provides direct access to all `built-in' identifiers of
Python; e.g. \code{__builtin__.open} is the full name for the built-in
diff --git a/Doc/lib/libcalendar.tex b/Doc/lib/libcalendar.tex
index 79515b1..fc325f4 100644
--- a/Doc/lib/libcalendar.tex
+++ b/Doc/lib/libcalendar.tex
@@ -1,8 +1,10 @@
% This section was contributed by Drew Csillag <drew_csillag@geocities.com>.
\section{Standard Module \module{calendar}}
-\label{module-calendar}
-\stmodindex{calendar}
+\declaremodule{standard}{calendar}
+
+\modulesynopsis{None}
+
This module allows you to output calendars like the \UNIX{}
diff --git a/Doc/lib/libcd.tex b/Doc/lib/libcd.tex
index 44111a3..7c114d8 100644
--- a/Doc/lib/libcd.tex
+++ b/Doc/lib/libcd.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{cd}}
-\label{module-cd}
-\bimodindex{cd}
+\declaremodule{builtin}{cd}
+
+\modulesynopsis{Interface to the CD-ROM on Silicon Graphics systems.}
+
This module provides an interface to the Silicon Graphics CD library.
It is available only on Silicon Graphics systems.
diff --git a/Doc/lib/libcgi.tex b/Doc/lib/libcgi.tex
index cb0a6fb..de8d86d 100644
--- a/Doc/lib/libcgi.tex
+++ b/Doc/lib/libcgi.tex
@@ -1,6 +1,9 @@
\section{Standard Module \module{cgi}}
-\label{module-cgi}
-\stmodindex{cgi}
+\declaremodule{standard}{cgi}
+
+\modulesynopsis{Common Gateway Interface, used to interpret forms in server-side
+scripts.}
+
\indexii{WWW}{server}
\indexii{CGI}{protocol}
\indexii{HTTP}{protocol}
diff --git a/Doc/lib/libcmath.tex b/Doc/lib/libcmath.tex
index adce12f..5337967 100644
--- a/Doc/lib/libcmath.tex
+++ b/Doc/lib/libcmath.tex
@@ -1,7 +1,9 @@
\section{Built-in Module \module{cmath}}
-\label{module-cmath}
+\declaremodule{builtin}{cmath}
+
+
+\modulesynopsis{Mathematical functions for complex numbers.}
-\bimodindex{cmath}
This module is always available.
It provides access to mathematical functions for complex numbers.
The functions are:
diff --git a/Doc/lib/libcmd.tex b/Doc/lib/libcmd.tex
index 53935d5..d5d6cf8 100644
--- a/Doc/lib/libcmd.tex
+++ b/Doc/lib/libcmd.tex
@@ -1,7 +1,10 @@
% Documentation by ESR
\section{Standard Module \module{cmd}}
-\stmodindex{cmd}
-\label{module-cmd}
+\declaremodule{standard}{cmd}
+
+\modulesynopsis{Build line-oriented command interpreters; this is used by module
+\module{pdb}.}
+
The \class{Cmd} class provides a simple framework for writing
line-oriented command interpreters. These are often useful for
diff --git a/Doc/lib/libcode.tex b/Doc/lib/libcode.tex
index 023d276..12728c7 100644
--- a/Doc/lib/libcode.tex
+++ b/Doc/lib/libcode.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{code}}
-\label{module-code}
-\stmodindex{code}
+\declaremodule{standard}{code}
+
+\modulesynopsis{Code object services.}
+
The \code{code} module defines operations pertaining to Python code
objects.
diff --git a/Doc/lib/libcommands.tex b/Doc/lib/libcommands.tex
index 7ca3ede..bea1401 100644
--- a/Doc/lib/libcommands.tex
+++ b/Doc/lib/libcommands.tex
@@ -1,8 +1,10 @@
% Documentation written by Sue Williams.
\section{Standard Module \module{commands}}
-\stmodindex{commands}
-\label{module-commands}
+\declaremodule{standard}{commands}
+
+\modulesynopsis{Wrapper functions for \function{os.popen()}.}
+
The \module{commands} module contains wrapper functions for
\function{os.popen()} which take a system command as a string and
diff --git a/Doc/lib/libcopy.tex b/Doc/lib/libcopy.tex
index c106eca..c019476 100644
--- a/Doc/lib/libcopy.tex
+++ b/Doc/lib/libcopy.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{copy}}
-\label{module-copy}
-\stmodindex{copy}
+\declaremodule{standard}{copy}
+
+\modulesynopsis{Shallow and deep copy operations.}
+
\setindexsubitem{(copy function)}
\ttindex{copy}
\ttindex{deepcopy}
diff --git a/Doc/lib/libcopyreg.tex b/Doc/lib/libcopyreg.tex
index 7dabf42..0874b4e 100644
--- a/Doc/lib/libcopyreg.tex
+++ b/Doc/lib/libcopyreg.tex
@@ -1,13 +1,13 @@
\section{Standard Module \module{copy_reg}}
-% Note that the label is a little off; the underscore causes LaTeX to
-% yell & scream.
-\label{module-copyreg}
-\stmodindex{copy_reg}
+\declaremodule[copyreg]{standard}{copy_reg}
-The \code{copy_reg} module provides support for the
-\code{pickle}\refstmodindex{pickle} and
-\code{cPickle}\refbimodindex{cPickle} modules. The
-\code{copy}\refstmodindex{copy} module is likely to use this in the
+\modulesynopsis{Register \module{pickle} support functions.}
+
+
+The \module{copy_reg} module provides support for the
+\module{pickle}\refstmodindex{pickle} and
+\module{cPickle}\refbimodindex{cPickle} modules. The
+\module{copy}\refstmodindex{copy} module is likely to use this in the
future as well. It provides configuration information about object
constructors which are not classes. Such constructors may be factory
functions or class instances.
diff --git a/Doc/lib/libcrypt.tex b/Doc/lib/libcrypt.tex
index 8e9a7d3..418b9d5 100644
--- a/Doc/lib/libcrypt.tex
+++ b/Doc/lib/libcrypt.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{crypt}}
-\label{module-crypt}
-\bimodindex{crypt}
+\declaremodule{builtin}{crypt}
+
+\modulesynopsis{The \cfunction{crypt()} function used to check \UNIX{} passwords.}
+
This module implements an interface to the \manpage{crypt}{3} routine,
which is a one-way hash function based upon a modified DES algorithm;
diff --git a/Doc/lib/libcrypto.tex b/Doc/lib/libcrypto.tex
index 339a9aa..1353342 100644
--- a/Doc/lib/libcrypto.tex
+++ b/Doc/lib/libcrypto.tex
@@ -6,18 +6,7 @@ The modules described in this chapter implement various algorithms of
a cryptographic nature. They are available at the discretion of the
installation. Here's an overview:
-\begin{description}
-
-\item[md5]
---- RSA's MD5 message digest algorithm.
-
-\item[mpz]
---- Interface to the GNU MP library for arbitrary precision arithmetic.
-
-\item[rotor]
---- Enigma-like encryption and decryption.
-
-\end{description}
+\localmoduletable
Hardcore cypherpunks will probably find the cryptographic modules
written by Andrew Kuchling of further interest; the package adds
diff --git a/Doc/lib/libdbm.tex b/Doc/lib/libdbm.tex
index c4317fe..b7ee647 100644
--- a/Doc/lib/libdbm.tex
+++ b/Doc/lib/libdbm.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{dbm}}
-\label{module-dbm}
-\bimodindex{dbm}
+\declaremodule{builtin}{dbm}
+
+\modulesynopsis{The standard ``database'' interface, based on ndbm.}
+
The \code{dbm} module provides an interface to the \UNIX{}
\code{(n)dbm} library. Dbm objects behave like mappings
diff --git a/Doc/lib/libdis.tex b/Doc/lib/libdis.tex
index eb60150..9c7fee6 100644
--- a/Doc/lib/libdis.tex
+++ b/Doc/lib/libdis.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{dis}}
-\stmodindex{dis}
-\label{module-dis}
+\declaremodule{standard}{dis}
+
+\modulesynopsis{Disassembler.}
+
The \module{dis} module supports the analysis of Python byte code by
disassembling it. Since there is no Python assembler, this module
diff --git a/Doc/lib/liberrno.tex b/Doc/lib/liberrno.tex
index 40ab90d..c21f0fd 100644
--- a/Doc/lib/liberrno.tex
+++ b/Doc/lib/liberrno.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{errno}}
-\label{module-errno}
-\stmodindex{errno}
+\declaremodule{standard}{errno}
+
+\modulesynopsis{Standard errno system symbols.}
+
This module makes available standard errno system symbols.
diff --git a/Doc/lib/libexcs.tex b/Doc/lib/libexcs.tex
index 7d2d85f..02325af 100644
--- a/Doc/lib/libexcs.tex
+++ b/Doc/lib/libexcs.tex
@@ -2,6 +2,7 @@
\label{module-exceptions}
\stmodindex{exceptions}
+
Exceptions can be class objects or string objects. While
traditionally, most exceptions have been string objects, in Python
1.5, all standard exceptions have been converted to class objects,
diff --git a/Doc/lib/libfcntl.tex b/Doc/lib/libfcntl.tex
index 1c64af9..e693067 100644
--- a/Doc/lib/libfcntl.tex
+++ b/Doc/lib/libfcntl.tex
@@ -1,7 +1,9 @@
% Manual text by Jaap Vermeulen
\section{Built-in Module \module{fcntl}}
-\label{module-fcntl}
-\bimodindex{fcntl}
+\declaremodule{builtin}{fcntl}
+
+\modulesynopsis{The \function{fcntl()} and \function{ioctl()} system calls.}
+
\indexii{UNIX@\UNIX{}}{file control}
\indexii{UNIX@\UNIX{}}{I/O control}
diff --git a/Doc/lib/libfileinput.tex b/Doc/lib/libfileinput.tex
index 0c0e81b..1613cfa 100644
--- a/Doc/lib/libfileinput.tex
+++ b/Doc/lib/libfileinput.tex
@@ -1,8 +1,11 @@
% Documentation heavily adapted from module docstring.
\section{Standard Module \module{fileinput}}
-\stmodindex{fileinput}
-\label{module-fileinput}
+\declaremodule{standard}{fileinput}
+
+\modulesynopsis{Perl-like iteration over lines from multiple input streams, with
+``save in place'' capability.}
+
This module implements a helper class and functions to quickly write a
loop over standard input or a list of files.
diff --git a/Doc/lib/libfl.tex b/Doc/lib/libfl.tex
index 7ebec7d..601b2c8 100644
--- a/Doc/lib/libfl.tex
+++ b/Doc/lib/libfl.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{fl}}
-\label{module-fl}
-\bimodindex{fl}
+\declaremodule{builtin}{fl}
+
+\modulesynopsis{FORMS library interface for GUI applications.}
+
This module provides an interface to the FORMS Library\index{FORMS
Library} by Mark Overmars\index{Overmars, Mark}. The source for the
@@ -463,8 +465,10 @@ FORMS objects have these data attributes; see the FORMS documentation:
\end{tableiii}
\section{Standard Module \module{FL}}
-\label{module-FLuppercase}
-\stmodindex{FL}
+\declaremodule{standard}{FL}
+
+\modulesynopsis{Constants used with the \module{fl} module.}
+
This module defines symbolic constants needed to use the built-in
module \module{fl} (see above); they are equivalent to those defined in
@@ -478,8 +482,10 @@ from FL import *
\end{verbatim}
\section{Standard Module \module{flp}}
-\label{module-flp}
-\stmodindex{flp}
+\declaremodule{standard}{flp}
+
+\modulesynopsis{Loading functions for stored FORMS designs.}
+
This module defines functions that can read form definitions created
by the `form designer' (\program{fdesign}) program that comes with the
diff --git a/Doc/lib/libfm.tex b/Doc/lib/libfm.tex
index abcbaa4..b52fd26 100644
--- a/Doc/lib/libfm.tex
+++ b/Doc/lib/libfm.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{fm}}
-\label{module-fm}
-\bimodindex{fm}
+\declaremodule{builtin}{fm}
+
+\modulesynopsis{\emph{Font Manager} interface for SGI workstations.}
+
This module provides access to the IRIS \emph{Font Manager} library.
\index{Font Manager, IRIS}
diff --git a/Doc/lib/libfnmatch.tex b/Doc/lib/libfnmatch.tex
index f2f82ba..b1f3a1b 100644
--- a/Doc/lib/libfnmatch.tex
+++ b/Doc/lib/libfnmatch.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{fnmatch}}
-\label{module-fnmatch}
-\stmodindex{fnmatch}
+\declaremodule{standard}{fnmatch}
+
+\modulesynopsis{\UNIX{} shell style pathname pattern matching.}
+
This module provides support for \UNIX{} shell-style wildcards, which
are \emph{not} the same as regular expressions (which are documented
diff --git a/Doc/lib/libformatter.tex b/Doc/lib/libformatter.tex
index 6a97f80..c1cf14f 100644
--- a/Doc/lib/libformatter.tex
+++ b/Doc/lib/libformatter.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{formatter}}
-\label{module-formatter}
-\stmodindex{formatter}
+\declaremodule{standard}{formatter}
+
+\modulesynopsis{Generic output formatter and device interface.}
+
This module supports two interface definitions, each with mulitple
diff --git a/Doc/lib/libftplib.tex b/Doc/lib/libftplib.tex
index 8ba2c61..00b01a7 100644
--- a/Doc/lib/libftplib.tex
+++ b/Doc/lib/libftplib.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{ftplib}}
-\label{module-ftplib}
-\stmodindex{ftplib}
+\declaremodule{standard}{ftplib}
+
+\modulesynopsis{FTP protocol client (requires sockets).}
+
\indexii{FTP}{protocol}
diff --git a/Doc/lib/libgdbm.tex b/Doc/lib/libgdbm.tex
index 8f2d7d1..844c3b3 100644
--- a/Doc/lib/libgdbm.tex
+++ b/Doc/lib/libgdbm.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{gdbm}}
-\label{module-gdbm}
-\bimodindex{gdbm}
+\declaremodule{builtin}{gdbm}
+
+\modulesynopsis{GNU's reinterpretation of dbm.}
+
% Note that if this section appears on the same page as the first
% paragraph of the dbm module section, makeindex will produce the
diff --git a/Doc/lib/libgetopt.tex b/Doc/lib/libgetopt.tex
index be00fef..6f839a7 100644
--- a/Doc/lib/libgetopt.tex
+++ b/Doc/lib/libgetopt.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{getopt}}
-\label{module-getopt}
-\stmodindex{getopt}
+\declaremodule{standard}{getopt}
+
+\modulesynopsis{Parser for command line options.}
+
This module helps scripts to parse the command line arguments in
\code{sys.argv}.
diff --git a/Doc/lib/libgl.tex b/Doc/lib/libgl.tex
index abbaf10..6824418 100644
--- a/Doc/lib/libgl.tex
+++ b/Doc/lib/libgl.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{gl}}
-\label{module-gl}
-\bimodindex{gl}
+\declaremodule{builtin}{gl}
+
+\modulesynopsis{Functions from the Silicon Graphics \emph{Graphics Library}.}
+
This module provides access to the Silicon Graphics
\emph{Graphics Library}.
@@ -183,15 +185,22 @@ def main():
main()
\end{verbatim}
%
-\section{Standard Modules \module{GL} and \module{DEVICE}}
-\nodename{GL and DEVICE}
-\stmodindex{GL}
-\stmodindex{DEVICE}
-
-These modules define the constants used by the Silicon Graphics
-\emph{Graphics Library}
-that C programmers find in the header files
-\file{<gl/gl.h>}
-and
-\file{<gl/device.h>}.
-Read the module source files for details.
+\section{Standard Module \module{DEVICE}}
+\declaremodule{standard}{DEVICE}
+
+\modulesynopsis{Constants used with the \module{gl} module.}
+
+This modules defines the constants used by the Silicon Graphics
+\emph{Graphics Library} that C programmers find in the header file
+\code{<gl/device.h>}.
+Read the module source file for details.
+
+
+\section{Standard Module \module{GL}}
+\declaremodule{standard}{GL}
+
+\modulesynopsis{Constants used with the \module{gl} module.}
+
+This module contains constants used by the Silicon Graphics
+\emph{Graphics Library} from the C header file \code{<gl/gl.h>}.
+Read the module source file for details.
diff --git a/Doc/lib/libglob.tex b/Doc/lib/libglob.tex
index 10f667a..8c93e43 100644
--- a/Doc/lib/libglob.tex
+++ b/Doc/lib/libglob.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{glob}}
-\label{module-glob}
-\stmodindex{glob}
+\declaremodule{standard}{glob}
+
+\modulesynopsis{\UNIX{} shell style pathname pattern expansion.}
+
The \module{glob} module finds all the pathnames matching a specified
pattern according to the rules used by the \UNIX{} shell. No tilde
diff --git a/Doc/lib/libgopherlib.tex b/Doc/lib/libgopherlib.tex
index 156d6d7..a6e6fc3 100644
--- a/Doc/lib/libgopherlib.tex
+++ b/Doc/lib/libgopherlib.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{gopherlib}}
-\label{module-gopherlib}
-\stmodindex{gopherlib}
+\declaremodule{standard}{gopherlib}
+
+\modulesynopsis{Gopher protocol client (requires sockets).}
+
\indexii{Gopher}{protocol}
diff --git a/Doc/lib/libgrp.tex b/Doc/lib/libgrp.tex
index 551171b..986c831 100644
--- a/Doc/lib/libgrp.tex
+++ b/Doc/lib/libgrp.tex
@@ -1,7 +1,9 @@
\section{Built-in Module \module{grp}}
-\label{module-grp}
+\declaremodule{builtin}{grp}
+
+
+\modulesynopsis{The group database (\function{getgrnam()} and friends).}
-\bimodindex{grp}
This module provides access to the \UNIX{} group database.
It is available on all \UNIX{} versions.
diff --git a/Doc/lib/libgzip.tex b/Doc/lib/libgzip.tex
index f649a4d..75388a8 100644
--- a/Doc/lib/libgzip.tex
+++ b/Doc/lib/libgzip.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{gzip}}
-\label{module-gzip}
-\stmodindex{gzip}
+\declaremodule{standard}{gzip}
+
+\modulesynopsis{None}
+
The data compression provided by the \code{zlib} module is compatible
with that used by the GNU compression program \program{gzip}.
diff --git a/Doc/lib/libhtmllib.tex b/Doc/lib/libhtmllib.tex
index c856b42..899e76e 100644
--- a/Doc/lib/libhtmllib.tex
+++ b/Doc/lib/libhtmllib.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{htmllib}}
-\label{module-htmllib}
-\stmodindex{htmllib}
+\declaremodule{standard}{htmllib}
+
+\modulesynopsis{A parser for HTML documents.}
+
\index{HTML}
\index{hypertext}
diff --git a/Doc/lib/libhttplib.tex b/Doc/lib/libhttplib.tex
index 55ec9b98..e217967 100644
--- a/Doc/lib/libhttplib.tex
+++ b/Doc/lib/libhttplib.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{httplib}}
-\label{module-httplib}
-\stmodindex{httplib}
+\declaremodule{standard}{httplib}
+
+\modulesynopsis{HTTP protocol client (requires sockets).}
+
\indexii{HTTP}{protocol}
diff --git a/Doc/lib/libimageop.tex b/Doc/lib/libimageop.tex
index c21be48..1c01241 100644
--- a/Doc/lib/libimageop.tex
+++ b/Doc/lib/libimageop.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{imageop}}
-\label{module-imageop}
-\bimodindex{imageop}
+\declaremodule{builtin}{imageop}
+
+\modulesynopsis{Manipulate raw image data.}
+
The \module{imageop} module contains some useful operations on images.
It operates on images consisting of 8 or 32 bit pixels stored in
diff --git a/Doc/lib/libimaplib.tex b/Doc/lib/libimaplib.tex
index fa3ec68..5501cd2 100644
--- a/Doc/lib/libimaplib.tex
+++ b/Doc/lib/libimaplib.tex
@@ -4,8 +4,10 @@
% The imaplib module was written by Piers Lauder.
\section{Standard Module \module{imaplib}}
-\stmodindex{imaplib}
-\label{module-imaplib}
+\declaremodule{standard}{imaplib}
+
+\modulesynopsis{IMAP4 protocol client (requires sockets).}
+
\indexii{IMAP4}{protocol}
This module defines a class, \class{IMAP4}, which encapsulates a
diff --git a/Doc/lib/libimgfile.tex b/Doc/lib/libimgfile.tex
index e74fe9e..d4c3002 100644
--- a/Doc/lib/libimgfile.tex
+++ b/Doc/lib/libimgfile.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{imgfile}}
-\label{module-imgfile}
-\bimodindex{imgfile}
+\declaremodule{builtin}{imgfile}
+
+\modulesynopsis{Support for SGI imglib files.}
+
The \module{imgfile} module allows Python programs to access SGI imglib image
files (also known as \file{.rgb} files). The module is far from
diff --git a/Doc/lib/libimghdr.tex b/Doc/lib/libimghdr.tex
index 9e58fdd..637dca2 100644
--- a/Doc/lib/libimghdr.tex
+++ b/Doc/lib/libimghdr.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{imghdr}}
-\label{module-imghdr}
-\stmodindex{imghdr}
+\declaremodule{standard}{imghdr}
+
+\modulesynopsis{Determine the type of image contained in a file or byte stream.}
+
The \module{imghdr} module determines the type of image contained in a
file or byte stream.
diff --git a/Doc/lib/libimp.tex b/Doc/lib/libimp.tex
index 7d4f8d1..945ffde 100644
--- a/Doc/lib/libimp.tex
+++ b/Doc/lib/libimp.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{imp}}
-\label{module-imp}
-\bimodindex{imp}
+\declaremodule{builtin}{imp}
+
+\modulesynopsis{Access the implementation of the \keyword{import} statement.}
+
\index{import}
This module provides an interface to the mechanisms used to implement
diff --git a/Doc/lib/libjpeg.tex b/Doc/lib/libjpeg.tex
index 76e70af..2c227ff 100644
--- a/Doc/lib/libjpeg.tex
+++ b/Doc/lib/libjpeg.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{jpeg}}
-\label{module-jpeg}
-\bimodindex{jpeg}
+\declaremodule{builtin}{jpeg}
+
+\modulesynopsis{Read and write image files in compressed JPEG format.}
+
The module \module{jpeg} provides access to the jpeg compressor and
decompressor written by the Independent JPEG Group%
diff --git a/Doc/lib/libkeyword.tex b/Doc/lib/libkeyword.tex
index 7a263ef..24635a5 100644
--- a/Doc/lib/libkeyword.tex
+++ b/Doc/lib/libkeyword.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{keyword}}
-\label{module-keyword}
-\stmodindex{keyword}
+\declaremodule{standard}{keyword}
+
+\modulesynopsis{Test whether a string is a keyword in the Python language.}
+
This module allows a Python program to determine if a string is a
keyword. A single function is provided:
diff --git a/Doc/lib/liblocale.tex b/Doc/lib/liblocale.tex
index 07361b8..9b08872 100644
--- a/Doc/lib/liblocale.tex
+++ b/Doc/lib/liblocale.tex
@@ -1,7 +1,9 @@
\section{Standard Module \module{locale}}
-\stmodindex{locale}
+\declaremodule{standard}{locale}
+
+
+\modulesynopsis{Internationalization services.}
-\label{module-locale}
The \code{locale} module opens access to the \POSIX{} locale database
and functionality. The \POSIX{} locale mechanism allows applications
diff --git a/Doc/lib/libmailbox.tex b/Doc/lib/libmailbox.tex
index 4ff2dedb..5ebc57d 100644
--- a/Doc/lib/libmailbox.tex
+++ b/Doc/lib/libmailbox.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{mailbox}}
-\label{module-mailbox}
-\stmodindex{mailbox}
+\declaremodule{standard}{mailbox}
+
+\modulesynopsis{Read various mailbox formats.}
+
This module defines a number of classes that allow easy and uniform
diff --git a/Doc/lib/libmailcap.tex b/Doc/lib/libmailcap.tex
index 0ea762a..8c8b705 100644
--- a/Doc/lib/libmailcap.tex
+++ b/Doc/lib/libmailcap.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{mailcap}}
-\label{module-mailcap}
-\stmodindex{mailcap}
+\declaremodule{standard}{mailcap}
+
+\modulesynopsis{Mailcap file handling.}
+
Mailcap files are used to configure how MIME-aware applications such
as mail readers and Web browsers react to files with different MIME
diff --git a/Doc/lib/libmain.tex b/Doc/lib/libmain.tex
index df1fbfb..39edfd7 100644
--- a/Doc/lib/libmain.tex
+++ b/Doc/lib/libmain.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{__main__}}
-\label{module-main}
-\bimodindex{__main__}
+\declaremodule[main]{builtin}{__main__}
+
+\modulesynopsis{The environment where the top-level script is run.}
+
This module represents the (otherwise anonymous) scope in which the
interpreter's main program executes --- commands read either from
standard input or from a script file.
diff --git a/Doc/lib/libmarshal.tex b/Doc/lib/libmarshal.tex
index 5878cfa..ab7cd05 100644
--- a/Doc/lib/libmarshal.tex
+++ b/Doc/lib/libmarshal.tex
@@ -1,6 +1,9 @@
\section{Built-in Module \module{marshal}}
-\label{module-marshal}
-\bimodindex{marshal}
+\declaremodule{builtin}{marshal}
+
+\modulesynopsis{Convert Python objects to streams of bytes and back (with
+different constraints).}
+
This module contains functions that can read and write Python
values in a binary format. The format is specific to Python, but
diff --git a/Doc/lib/libmath.tex b/Doc/lib/libmath.tex
index 1cc6b20..7ecda2e 100644
--- a/Doc/lib/libmath.tex
+++ b/Doc/lib/libmath.tex
@@ -1,7 +1,9 @@
\section{Built-in Module \module{math}}
-\label{module-math}
+\declaremodule{builtin}{math}
+
+
+\modulesynopsis{Mathematical functions (\function{sin()} etc.).}
-\bimodindex{math}
This module is always available.
It provides access to the mathematical functions defined by the \C{}
standard.
diff --git a/Doc/lib/libmd5.tex b/Doc/lib/libmd5.tex
index d1e7367..b754a66 100644
--- a/Doc/lib/libmd5.tex
+++ b/Doc/lib/libmd5.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{md5}}
-\label{module-md5}
-\bimodindex{md5}
+\declaremodule{builtin}{md5}
+
+\modulesynopsis{RSA's MD5 message digest algorithm.}
+
This module implements the interface to RSA's MD5 message digest
\index{message digest, MD5}
diff --git a/Doc/lib/libmimetools.tex b/Doc/lib/libmimetools.tex
index 54d1fe0..4cb1300 100644
--- a/Doc/lib/libmimetools.tex
+++ b/Doc/lib/libmimetools.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{mimetools}}
-\label{module-mimetools}
-\stmodindex{mimetools}
+\declaremodule{standard}{mimetools}
+
+\modulesynopsis{Tools for parsing MIME style message bodies.}
+
This module defines a subclass of the \class{rfc822.Message} class and
diff --git a/Doc/lib/libmimetypes.tex b/Doc/lib/libmimetypes.tex
index 6cfd853..afd5cca 100644
--- a/Doc/lib/libmimetypes.tex
+++ b/Doc/lib/libmimetypes.tex
@@ -3,8 +3,10 @@
% mimetypes module.
\section{Standard Module \module{mimetypes}}
-\label{module-mimetypes}
-\stmodindex{mimetypes}
+\declaremodule{standard}{mimetypes}
+
+\modulesynopsis{Mapping of filename extensions to MIME types.}
+
\indexii{MIME}{content type}
The \module{mimetypes} converts between a filename or URL and the MIME
diff --git a/Doc/lib/libmimify.tex b/Doc/lib/libmimify.tex
index 366e940..87740b3 100644
--- a/Doc/lib/libmimify.tex
+++ b/Doc/lib/libmimify.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{mimify}}
-\label{module-mimify}
-\stmodindex{mimify}
+\declaremodule{standard}{mimify}
+
+\modulesynopsis{Mimification and unmimification of mail messages.}
+
The mimify module defines two functions to convert mail messages to
and from MIME format. The mail message can be either a simple message
diff --git a/Doc/lib/libmisc.tex b/Doc/lib/libmisc.tex
index 306c43c..6f79eda 100644
--- a/Doc/lib/libmisc.tex
+++ b/Doc/lib/libmisc.tex
@@ -4,29 +4,4 @@
The modules described in this chapter provide miscellaneous services
that are available in all Python versions. Here's an overview:
-\begin{description}
-
-\item[math]
---- Mathematical functions (\function{sin()} etc.).
-
-\item[cmath]
---- Mathematical functions for complex numbers.
-
-\item[whrandom]
---- Floating point pseudo-random number generator.
-
-\item[random]
---- Generate pseudo-random numbers with various common distributions.
-
-\item[array]
---- Efficient arrays of uniformly typed numeric values.
-
-\item[fileinput]
---- Perl-like iteration over lines from multiple input streams, with
-``save in place'' capability.
-
-\item[cmd]
---- Build line-oriented command interpreters; this is used by module
-\module{pdb}.
-
-\end{description}
+\localmoduletable
diff --git a/Doc/lib/libmm.tex b/Doc/lib/libmm.tex
index 8660909..22c14b4 100644
--- a/Doc/lib/libmm.tex
+++ b/Doc/lib/libmm.tex
@@ -5,25 +5,4 @@ The modules described in this chapter implement various algorithms or
interfaces that are mainly useful for multimedia applications. They
are available at the discretion of the installation. Here's an overview:
-\begin{description}
-
-\item[audioop]
---- Manipulate raw audio data.
-
-\item[imageop]
---- Manipulate raw image data.
-
-\item[aifc]
---- Read and write audio files in AIFF or AIFC format.
-
-\item[jpeg]
---- Read and write image files in compressed JPEG format.
-
-\item[rgbimg]
---- Read and write image files in ``SGI RGB'' format (the module is
-\emph{not} SGI specific though)!
-
-\item[imghdr]
---- Determine the type of image contained in a file or byte stream.
-
-\end{description}
+\localmoduletable
diff --git a/Doc/lib/libmpz.tex b/Doc/lib/libmpz.tex
index 707a3a8..98f09a8 100644
--- a/Doc/lib/libmpz.tex
+++ b/Doc/lib/libmpz.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{mpz}}
-\label{module-mpz}
-\bimodindex{mpz}
+\declaremodule{builtin}{mpz}
+
+\modulesynopsis{Interface to the GNU MP library for arbitrary precision arithmetic.}
+
This is an optional module. It is only available when Python is
configured to include it, which requires that the GNU MP software is
diff --git a/Doc/lib/libmultifile.tex b/Doc/lib/libmultifile.tex
index ea92cdc..41f494e 100644
--- a/Doc/lib/libmultifile.tex
+++ b/Doc/lib/libmultifile.tex
@@ -1,7 +1,9 @@
% Documentation by ESR
\section{Standard Module \module{multifile}}
-\stmodindex{multiFile}
-\label{module-multifile}
+\declaremodule[multifile]{standard}{multiFile}
+
+\modulesynopsis{None}
+
The \class{MultiFile} object enables you to treat sections of a text
file as file-like input objects, with \code{''} being returned by
diff --git a/Doc/lib/libni.tex b/Doc/lib/libni.tex
index 14ff395..e962eea 100644
--- a/Doc/lib/libni.tex
+++ b/Doc/lib/libni.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{ni}}
-\label{module-ni}
-\stmodindex{ni}
+\declaremodule{standard}{ni}
+
+\modulesynopsis{None}
+
\strong{Warning: This module is obsolete.} As of Python 1.5a4,
package support (with different semantics for \code{__init__} and no
diff --git a/Doc/lib/libnntplib.tex b/Doc/lib/libnntplib.tex
index b02f142..d6e0f81 100644
--- a/Doc/lib/libnntplib.tex
+++ b/Doc/lib/libnntplib.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{nntplib}}
-\label{module-nntplib}
-\stmodindex{nntplib}
+\declaremodule{standard}{nntplib}
+
+\modulesynopsis{NNTP protocol client (requires sockets).}
+
\indexii{NNTP}{protocol}
\index{Network News Transfer Protocol}
diff --git a/Doc/lib/liboperator.tex b/Doc/lib/liboperator.tex
index 1805770..f5186e0 100644
--- a/Doc/lib/liboperator.tex
+++ b/Doc/lib/liboperator.tex
@@ -1,8 +1,10 @@
% Contributed by Skip Montanaro, from the module's doc strings.
\section{Built-in Module \module{operator}}
-\label{module-operator}
-\bimodindex{operator}
+\declaremodule{builtin}{operator}
+
+\modulesynopsis{All Python's standard operators as built-in functions.}
+
The \module{operator} module exports a set of functions implemented in C
corresponding to the intrinsic operators of Python. For example,
diff --git a/Doc/lib/libos.tex b/Doc/lib/libos.tex
index 05ce8b6..b9f3f20 100644
--- a/Doc/lib/libos.tex
+++ b/Doc/lib/libos.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{os}}
-\label{module-os}
-\stmodindex{os}
+\declaremodule{standard}{os}
+
+\modulesynopsis{Miscellaneous OS interfaces.}
+
This module provides a more portable way of using operating system
(OS) dependent functionality than importing an OS dependent built-in
diff --git a/Doc/lib/libpanel.tex b/Doc/lib/libpanel.tex
index 3553808..66ac2a8 100644
--- a/Doc/lib/libpanel.tex
+++ b/Doc/lib/libpanel.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{panel}}
-\label{module-panel}
-\stmodindex{panel}
+\declaremodule{standard}{panel}
+
+\modulesynopsis{None}
+
\strong{Please note:} The FORMS library, to which the
\code{fl}\refbimodindex{fl} module described above interfaces, is a
@@ -30,8 +32,10 @@ or
\code{panel.defpanellist()}.
\section{Standard Module \module{panelparser}}
-\label{module-panelparser}
-\stmodindex{panelparser}
+\declaremodule{standard}{panelparser}
+
+\modulesynopsis{None}
+
This module defines a self-contained parser for S-expressions as output
by the Panel Editor (which is written in Scheme so it can't help writing
@@ -46,8 +50,10 @@ For more details, read the module file.
% XXXXJH should be funcdesc, I think
\section{Built-in Module \module{pnl}}
-\label{module-pnl}
-\bimodindex{pnl}
+\declaremodule{builtin}{pnl}
+
+\modulesynopsis{None}
+
This module provides access to the
\emph{Panel Library}
diff --git a/Doc/lib/libparser.tex b/Doc/lib/libparser.tex
index 6759a9f..cbea16d 100644
--- a/Doc/lib/libparser.tex
+++ b/Doc/lib/libparser.tex
@@ -10,8 +10,11 @@
%
\section{Built-in Module \module{parser}}
-\label{module-parser}
-\bimodindex{parser}
+\declaremodule{builtin}{parser}
+
+\modulesynopsis{Retrieve and submit parse trees from and to the runtime support
+environment.}
+
\index{parsing!Python source code}
The \module{parser} module provides an interface to Python's internal
diff --git a/Doc/lib/libpdb.tex b/Doc/lib/libpdb.tex
index 5a19ea5..ee2ac0a 100644
--- a/Doc/lib/libpdb.tex
+++ b/Doc/lib/libpdb.tex
@@ -1,6 +1,8 @@
\chapter{The Python Debugger}
-\label{module-pdb}
-\stmodindex{pdb}
+\declaremodule{standard}{pdb}
+
+\modulesynopsis{None}
+
\index{debugging}
diff --git a/Doc/lib/libpickle.tex b/Doc/lib/libpickle.tex
index edd496f..60999eb 100644
--- a/Doc/lib/libpickle.tex
+++ b/Doc/lib/libpickle.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{pickle}}
-\label{module-pickle}
-\stmodindex{pickle}
+\declaremodule{standard}{pickle}
+
+\modulesynopsis{Convert Python objects to streams of bytes and back.}
+
\index{persistency}
\indexii{persistent}{objects}
\indexii{serializing}{objects}
@@ -273,8 +275,10 @@ registration}
\section{Built-in Module \module{cPickle}}
-\bimodindex{cPickle}
-\label{module-cPickle}
+\declaremodule{builtin}{cPickle}
+
+\modulesynopsis{Faster version of \module{pickle}, but not subclassable.}
+
% This section was written by Fred L. Drake, Jr. <fdrake@acm.org>
diff --git a/Doc/lib/libpopen2.tex b/Doc/lib/libpopen2.tex
index 9e8a0ca..3bba4cc 100644
--- a/Doc/lib/libpopen2.tex
+++ b/Doc/lib/libpopen2.tex
@@ -3,8 +3,10 @@
% Drake, Jr. <fdrake@acm.org>.
\section{Standard Module \module{popen2}}
-\label{module-popen2}
-\stmodindex{popen2}
+\declaremodule{standard}{popen2}
+
+\modulesynopsis{None}
+
This module allows you to spawn processes and connect their
input/output/error pipes and obtain their return codes.
diff --git a/Doc/lib/libpoplib.tex b/Doc/lib/libpoplib.tex
index 12882e9..2c21a7f 100644
--- a/Doc/lib/libpoplib.tex
+++ b/Doc/lib/libpoplib.tex
@@ -4,8 +4,10 @@
%the imaplib ``chapter''.
\section{Standard Module \module{poplib}}
-\stmodindex{poplib}
-\label{module-poplib}
+\declaremodule{standard}{poplib}
+
+\modulesynopsis{POP3 protocol client (requires sockets).}
+
\indexii{POP3}{protocol}
This module defines a class, \class{POP3}, which encapsulates a
diff --git a/Doc/lib/libposix.tex b/Doc/lib/libposix.tex
index bccc283..b7d49b9 100644
--- a/Doc/lib/libposix.tex
+++ b/Doc/lib/libposix.tex
@@ -1,6 +1,9 @@
\section{Built-in Module \module{posix}}
-\label{module-posix}
-\bimodindex{posix}
+\declaremodule{builtin}{posix}
+
+\modulesynopsis{The most common \POSIX{} system calls (normally used via module
+\module{os}).}
+
This module provides access to operating system functionality that is
standardized by the \C{} Standard and the \POSIX{} standard (a thinly
diff --git a/Doc/lib/libposixfile.tex b/Doc/lib/libposixfile.tex
index a1f853d..b1742f1 100644
--- a/Doc/lib/libposixfile.tex
+++ b/Doc/lib/libposixfile.tex
@@ -1,7 +1,9 @@
% Manual text and implementation by Jaap Vermeulen
\section{Standard Module \module{posixfile}}
-\label{module-posixfile}
-\bimodindex{posixfile}
+\declaremodule{builtin}{posixfile}
+
+\modulesynopsis{A file-like object with support for locking.}
+
\indexii{\POSIX{}}{file object}
\emph{Note:} This module will become obsolete in a future release.
diff --git a/Doc/lib/libppath.tex b/Doc/lib/libppath.tex
index 728fe36..6373458 100644
--- a/Doc/lib/libppath.tex
+++ b/Doc/lib/libppath.tex
@@ -1,6 +1,7 @@
\section{Standard Module \module{posixpath}}
-\label{module-posixpath}
-\stmodindex{posixpath}
+\declaremodule{standard}{posixpath}
+
+\modulesynopsis{Common \POSIX{} pathname manipulations.}
This module implements some useful functions on \POSIX{} pathnames.
diff --git a/Doc/lib/libpprint.tex b/Doc/lib/libpprint.tex
index 0ad1dc5..0632875 100644
--- a/Doc/lib/libpprint.tex
+++ b/Doc/lib/libpprint.tex
@@ -1,8 +1,10 @@
%% Author: Fred L. Drake, Jr. <fdrake@acm.org>
\section{Standard Module \module{pprint}}
-\stmodindex{pprint}
-\label{module-pprint}
+\declaremodule{standard}{pprint}
+
+\modulesynopsis{Data pretty printer.}
+
The \module{pprint} module provides a capability to ``pretty-print''
arbitrary Python data structures in a form which can be used as input
diff --git a/Doc/lib/libprofile.tex b/Doc/lib/libprofile.tex
index 61da988..421812a 100644
--- a/Doc/lib/libprofile.tex
+++ b/Doc/lib/libprofile.tex
@@ -255,8 +255,10 @@ of algorithms to be directly compared to iterative implementations.
\section{Reference Manual}
-\stmodindex{profile}
-\label{module-profile}
+\declaremodule{standard}{profile}
+
+\modulesynopsis{None}
+
The primary entry point for the profiler is the global function
diff --git a/Doc/lib/libpwd.tex b/Doc/lib/libpwd.tex
index 5275acd..32113b4 100644
--- a/Doc/lib/libpwd.tex
+++ b/Doc/lib/libpwd.tex
@@ -1,7 +1,9 @@
\section{Built-in Module \module{pwd}}
-\label{module-pwd}
+\declaremodule{builtin}{pwd}
+
+
+\modulesynopsis{The password database (\function{getpwnam()} and friends).}
-\bimodindex{pwd}
This module provides access to the \UNIX{} password database.
It is available on all \UNIX{} versions.
diff --git a/Doc/lib/libpython.tex b/Doc/lib/libpython.tex
index 944f80f..37d1dfe 100644
--- a/Doc/lib/libpython.tex
+++ b/Doc/lib/libpython.tex
@@ -5,80 +5,4 @@ The modules described in this chapter provide a wide range of services
related to the Python interpreter and its interaction with its
environment. Here's an overview:
-\begin{description}
-
-\item[sys]
---- Access system specific parameters and functions.
-
-\item[types]
---- Names for all built-in types.
-
-\item[UserDict]
---- Class wrapper for dictionary objects.
-
-\item[UserList]
---- Class wrapper for list objects.
-
-\item[operator]
---- All Python's standard operators as built-in functions.
-
-\item[traceback]
---- Print or retrieve a stack traceback.
-
-\item[pickle]
---- Convert Python objects to streams of bytes and back.
-
-\item[cPickle]
---- Faster version of \module{pickle}, but not subclassable.
-
-\item[copy_reg]
---- Register \module{pickle} support functions.
-
-\item[shelve]
---- Python object persistency.
-
-\item[copy]
---- Shallow and deep copy operations.
-
-\item[marshal]
---- Convert Python objects to streams of bytes and back (with
-different constraints).
-
-\item[imp]
---- Access the implementation of the \keyword{import} statement.
-
-\item[parser]
---- Retrieve and submit parse trees from and to the runtime support
-environment.
-
-\item[symbol]
---- Constants representing internal nodes of the parse tree.
-
-\item[token]
---- Constants representing terminal nodes of the parse tree.
-
-\item[keyword]
---- Test whether a string is a keyword in the Python language.
-
-\item[code]
---- Code object services.
-
-\item[pprint]
---- Data pretty printer.
-
-\item[dis]
---- Disassembler.
-
-\item[site]
---- A standard way to reference site-specific modules.
-
-\item[user]
---- A standard way to reference user-specific modules.
-
-\item[__builtin__]
---- The set of built-in functions.
-
-\item[__main__]
---- The environment where the top-level script is run.
-
-\end{description}
+\localmoduletable
diff --git a/Doc/lib/libqueue.tex b/Doc/lib/libqueue.tex
index 680238d..3231e11 100644
--- a/Doc/lib/libqueue.tex
+++ b/Doc/lib/libqueue.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{Queue}}
-\stmodindex{Queue}
-\label{module-Queue}
+\declaremodule{standard}{Queue}
+
+\modulesynopsis{A stynchronized queue class.}
+
The \module{Queue} module implements a multi-producer, multi-consumer
diff --git a/Doc/lib/libquopri.tex b/Doc/lib/libquopri.tex
index abe07df..6b1d209 100644
--- a/Doc/lib/libquopri.tex
+++ b/Doc/lib/libquopri.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{quopri}}
-\label{module-quopri}
-\stmodindex{quopri}
+\declaremodule{standard}{quopri}
+
+\modulesynopsis{Encode/decode binary files using the MIME quoted-printable encoding.}
+
This module performs quoted-printable transport encoding and decoding,
as defined in \rfc{1521}: ``MIME (Multipurpose Internet Mail Extensions)
diff --git a/Doc/lib/librand.tex b/Doc/lib/librand.tex
index a48ea22..7a5adea 100644
--- a/Doc/lib/librand.tex
+++ b/Doc/lib/librand.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{rand}}
-\label{module-rand}
-\stmodindex{rand}
+\declaremodule{standard}{rand}
+
+\modulesynopsis{None}
+
The \code{rand} module simulates the C library's \code{rand()}
interface, though the results aren't necessarily compatible with any
diff --git a/Doc/lib/librandom.tex b/Doc/lib/librandom.tex
index b76822e..4806876 100644
--- a/Doc/lib/librandom.tex
+++ b/Doc/lib/librandom.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{random}}
-\label{module-random}
-\stmodindex{random}
+\declaremodule{standard}{random}
+
+\modulesynopsis{Generate pseudo-random numbers with various common distributions.}
+
This module implements pseudo-random number generators for various
distributions: on the real line, there are functions to compute normal
diff --git a/Doc/lib/libre.tex b/Doc/lib/libre.tex
index 849fa28..c194213 100644
--- a/Doc/lib/libre.tex
+++ b/Doc/lib/libre.tex
@@ -1,7 +1,9 @@
\section{Built-in Module \module{re}}
-\label{module-re}
+\declaremodule{builtin}{re}
+
+
+\modulesynopsis{New Perl-style regular expression search and match operations.}
-\bimodindex{re}
This module provides regular expression matching operations similar to
those found in Perl. It's 8-bit clean: the strings being processed
diff --git a/Doc/lib/libregex.tex b/Doc/lib/libregex.tex
index e3adf55..253d50b 100644
--- a/Doc/lib/libregex.tex
+++ b/Doc/lib/libregex.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{regex}}
-\label{module-regex}
-\bimodindex{regex}
+\declaremodule{builtin}{regex}
+
+\modulesynopsis{Regular expression search and match operations.}
+
This module provides regular expression matching operations similar to
those found in Emacs.
diff --git a/Doc/lib/libregsub.tex b/Doc/lib/libregsub.tex
index c390a49..0a75f36 100644
--- a/Doc/lib/libregsub.tex
+++ b/Doc/lib/libregsub.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{regsub}}
-\label{module-regsub}
-\stmodindex{regsub}
+\declaremodule{standard}{regsub}
+
+\modulesynopsis{Substitution and splitting operations that use regular expressions.}
+
This module defines a number of functions useful for working with
regular expressions (see built-in module \code{regex}).
diff --git a/Doc/lib/libresource.tex b/Doc/lib/libresource.tex
index bb0bff2..887268e 100644
--- a/Doc/lib/libresource.tex
+++ b/Doc/lib/libresource.tex
@@ -1,7 +1,10 @@
\section{Built-in Module \module{resource}}
-\label{module-resource}
+\declaremodule{builtin}{resource}
+
+
+\modulesynopsis{An interface to provide resource usage information on the current
+process.}
-\bimodindex{resource}
This module provides basic mechanisms for measuring and controlling
system resources utilized by a program.
diff --git a/Doc/lib/librestricted.tex b/Doc/lib/librestricted.tex
index f78d7bb..cbd38c5 100644
--- a/Doc/lib/librestricted.tex
+++ b/Doc/lib/librestricted.tex
@@ -63,15 +63,7 @@ class and instance object attribute \code{__dict__} are unavailable.
Two modules provide the framework for setting up restricted execution
environments:
-\begin{description}
-
-\item[rexec]
---- Basic restricted execution framework.
-
-\item[Bastion]
---- Providing restricted access to objects.
-
-\end{description}
+\localmoduletable
\begin{seealso}
\seetext{Andrew Kuchling, ``Restricted Execution HOWTO.'' Available
diff --git a/Doc/lib/librexec.tex b/Doc/lib/librexec.tex
index 8778ae1..8881c93 100644
--- a/Doc/lib/librexec.tex
+++ b/Doc/lib/librexec.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{rexec}}
-\label{module-rexec}
-\stmodindex{rexec}
+\declaremodule{standard}{rexec}
+
+\modulesynopsis{Basic restricted execution framework.}
+
This module contains the \class{RExec} class, which supports
diff --git a/Doc/lib/librfc822.tex b/Doc/lib/librfc822.tex
index 2d8fc7e..fc6a58d 100644
--- a/Doc/lib/librfc822.tex
+++ b/Doc/lib/librfc822.tex
@@ -1,7 +1,9 @@
\section{Standard Module \module{rfc822}}
-\label{module-rfc822}
-\stmodindex{rfc822}
+\declaremodule{standard}{rfc822}
+\modulesynopsis{Parse \rfc{822} style mail headers.}
+
+%\index{RFC!RFC 822}
This module defines a class, \class{Message}, which represents a
collection of ``email headers'' as defined by the Internet standard
diff --git a/Doc/lib/librgbimg.tex b/Doc/lib/librgbimg.tex
index 73e4aae..d06eb76 100644
--- a/Doc/lib/librgbimg.tex
+++ b/Doc/lib/librgbimg.tex
@@ -1,6 +1,9 @@
\section{Built-in Module \module{rgbimg}}
-\label{module-rgbimg}
-\bimodindex{rgbimg}
+\declaremodule{builtin}{rgbimg}
+
+\modulesynopsis{Read and write image files in ``SGI RGB'' format (the module is
+\emph{not} SGI specific though)!}
+
The \module{rgbimg} module allows Python programs to access SGI imglib image
files (also known as \file{.rgb} files). The module is far from
diff --git a/Doc/lib/librotor.tex b/Doc/lib/librotor.tex
index 63dc56e..a59e2ca 100644
--- a/Doc/lib/librotor.tex
+++ b/Doc/lib/librotor.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{rotor}}
-\label{module-rotor}
-\bimodindex{rotor}
+\declaremodule{builtin}{rotor}
+
+\modulesynopsis{Enigma-like encryption and decryption.}
+
This module implements a rotor-based encryption algorithm, contributed by
Lance Ellinghouse\index{Ellinghouse, Lance}. The design is derived
diff --git a/Doc/lib/libselect.tex b/Doc/lib/libselect.tex
index b7a8c85..b8dfacc 100644
--- a/Doc/lib/libselect.tex
+++ b/Doc/lib/libselect.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{select}}
-\label{module-select}
-\bimodindex{select}
+\declaremodule{builtin}{select}
+
+\modulesynopsis{Wait for I/O completion on multiple streams.}
+
This module provides access to the function \cfunction{select()}
available in most \UNIX{} versions. It defines the following:
diff --git a/Doc/lib/libsgi.tex b/Doc/lib/libsgi.tex
index b1bb5cb..ca17ad0 100644
--- a/Doc/lib/libsgi.tex
+++ b/Doc/lib/libsgi.tex
@@ -3,3 +3,5 @@
The modules described in this chapter provide interfaces to features
that are unique to SGI's IRIX operating system (versions 4 and 5).
+
+\localmoduletable
diff --git a/Doc/lib/libsgmllib.tex b/Doc/lib/libsgmllib.tex
index f086b4b..642dacd 100644
--- a/Doc/lib/libsgmllib.tex
+++ b/Doc/lib/libsgmllib.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{sgmllib}}
-\label{module-sgmllib}
-\stmodindex{sgmllib}
+\declaremodule{standard}{sgmllib}
+
+\modulesynopsis{Only as much of an SGML parser as needed to parse HTML.}
+
\index{SGML}
This module defines a class \class{SGMLParser} which serves as the
diff --git a/Doc/lib/libshelve.tex b/Doc/lib/libshelve.tex
index 90afbc6..6b5aa76 100644
--- a/Doc/lib/libshelve.tex
+++ b/Doc/lib/libshelve.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{shelve}}
-\label{module-shelve}
-\stmodindex{shelve}
+\declaremodule{standard}{shelve}
+
+\modulesynopsis{Python object persistency.}
+
A ``shelf'' is a persistent, dictionary-like object. The difference
with ``dbm'' databases is that the values (not the keys!) in a shelf
diff --git a/Doc/lib/libsignal.tex b/Doc/lib/libsignal.tex
index 4a8b3b4..86d6967 100644
--- a/Doc/lib/libsignal.tex
+++ b/Doc/lib/libsignal.tex
@@ -1,7 +1,9 @@
\section{Built-in Module \module{signal}}
-\label{module-signal}
+\declaremodule{builtin}{signal}
+
+
+\modulesynopsis{Set handlers for asynchronous events.}
-\bimodindex{signal}
This module provides mechanisms to use signal handlers in Python.
Some general rules for working with signals handlers:
diff --git a/Doc/lib/libsite.tex b/Doc/lib/libsite.tex
index 84b1e64..020b266 100644
--- a/Doc/lib/libsite.tex
+++ b/Doc/lib/libsite.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{site}}
-\label{module-site}
-\stmodindex{site}
+\declaremodule{standard}{site}
+
+\modulesynopsis{A standard way to reference site-specific modules.}
+
\strong{This module is automatically imported during initialization.}
diff --git a/Doc/lib/libsmtplib.tex b/Doc/lib/libsmtplib.tex
index d67578a..699eb10 100644
--- a/Doc/lib/libsmtplib.tex
+++ b/Doc/lib/libsmtplib.tex
@@ -1,7 +1,9 @@
% Documentation by ESR
\section{Standard Module \module{smtplib}}
-\stmodindex{smtplib}
-\label{module-smtplib}
+\declaremodule{standard}{smtplib}
+
+\modulesynopsis{SMTP protocol client (requires sockets).}
+
\indexii{SMTP}{protocol}
\index{Simple Mail Transfer Protocol}
diff --git a/Doc/lib/libsocket.tex b/Doc/lib/libsocket.tex
index 76d2b1a..4a1558e 100644
--- a/Doc/lib/libsocket.tex
+++ b/Doc/lib/libsocket.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{socket}}
-\label{module-socket}
-\bimodindex{socket}
+\declaremodule{builtin}{socket}
+
+\modulesynopsis{Low-level networking interface.}
+
This module provides access to the BSD \emph{socket} interface.
It is available on \UNIX{} systems that support this interface.
diff --git a/Doc/lib/libsocksvr.tex b/Doc/lib/libsocksvr.tex
index 8769c36..a07b0e3 100644
--- a/Doc/lib/libsocksvr.tex
+++ b/Doc/lib/libsocksvr.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{SocketServer}}
-\label{module-SocketServer}
-\stmodindex{SocketServer}
+\declaremodule{standard}{SocketServer}
+
+\modulesynopsis{A framework for network servers.}
+
The \module{SocketServer} module simplifies the task of writing network
servers.
diff --git a/Doc/lib/libsomeos.tex b/Doc/lib/libsomeos.tex
index dcafd08..eea2321 100644
--- a/Doc/lib/libsomeos.tex
+++ b/Doc/lib/libsomeos.tex
@@ -7,37 +7,4 @@ The interfaces are generally modelled after the \UNIX{} or \C{}
interfaces but they are available on some other systems as well
(e.g. Windows or NT). Here's an overview:
-\begin{description}
-
-\item[signal]
---- Set handlers for asynchronous events.
-
-\item[socket]
---- Low-level networking interface.
-
-\item[select]
---- Wait for I/O completion on multiple streams.
-
-\item[thread]
---- Create multiple threads of control within one namespace.
-
-\item[threading]
---- Higher level threading interface; use in preference of module
-\module{thread}.
-
-\item[Queue]
---- A stynchronized queue class.
-
-\item[anydbm]
---- Generic interface to DBM-style database modules.
-
-\item[whichdb]
---- Guess which DBM-style module created a given database.
-
-\item[zlib]
-\item[gzip]
---- Compression and decompression compatible with the
-\program{gzip} program (\module{zlib} is the low-level interface,
-\module{gzip} the high-level one).
-
-\end{description}
+\localmoduletable
diff --git a/Doc/lib/libsoundex.tex b/Doc/lib/libsoundex.tex
index fdecbab..83e8bc7 100644
--- a/Doc/lib/libsoundex.tex
+++ b/Doc/lib/libsoundex.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{soundex}}
-\label{module-soundex}
-\bimodindex{soundex}
+\declaremodule{builtin}{soundex}
+
+\modulesynopsis{None}
+
The soundex algorithm takes an English word, and returns an
diff --git a/Doc/lib/libstat.tex b/Doc/lib/libstat.tex
index 5e76335..925a1d7 100644
--- a/Doc/lib/libstat.tex
+++ b/Doc/lib/libstat.tex
@@ -1,8 +1,11 @@
% By Skip Montanaro
\section{Standard Module \module{stat}}
-\stmodindex{stat}
-\label{module-stat}
+\declaremodule{standard}{stat}
+
+\modulesynopsis{Constants and functions for interpreting the results of
+\function{os.stat()}, \function{os.lstat()} and \function{os.fstat()}.}
+
The \code{stat} module defines constants and functions for interpreting the
results of \code{os.stat()} and \code{os.lstat()} (if they exist).
diff --git a/Doc/lib/libstdwin.tex b/Doc/lib/libstdwin.tex
index 146457a..64ccdd9 100644
--- a/Doc/lib/libstdwin.tex
+++ b/Doc/lib/libstdwin.tex
@@ -15,8 +15,10 @@ under X11, Win32 for Windows and Windows NT, and a collection of
native toolkit interfaces for the Macintosh.
\section{Built-in Module \module{stdwin}}
-\label{module-stdwin}
-\bimodindex{stdwin}
+\declaremodule{builtin}{stdwin}
+
+\modulesynopsis{None}
+
This module defines several new object types and functions that
provide access to the functionality of STDWIN.
@@ -776,8 +778,10 @@ main()
\end{verbatim}
%
\section{Standard Module \module{stdwinevents}}
-\label{module-stdwinevents}
-\stmodindex{stdwinevents}
+\declaremodule{standard}{stdwinevents}
+
+\modulesynopsis{None}
+
This module defines constants used by STDWIN for event types
(\code{WE_ACTIVATE} etc.), command codes (\code{WC_LEFT} etc.)
@@ -791,8 +795,10 @@ Suggested usage is
\end{verbatim}
%
\section{Standard Module \module{rect}}
-\label{module-rect}
-\stmodindex{rect}
+\declaremodule{standard}{rect}
+
+\modulesynopsis{None}
+
This module contains useful operations on rectangles.
A rectangle is defined as in module
diff --git a/Doc/lib/libstring.tex b/Doc/lib/libstring.tex
index 7d6f4bd..226f453 100644
--- a/Doc/lib/libstring.tex
+++ b/Doc/lib/libstring.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{string}}
-\label{module-string}
-\stmodindex{string}
+\declaremodule{standard}{string}
+
+\modulesynopsis{Common string operations.}
+
This module defines some constants useful for checking character
classes and some useful string functions. See the module
diff --git a/Doc/lib/libstrings.tex b/Doc/lib/libstrings.tex
index 7294002..4d7c0d1 100644
--- a/Doc/lib/libstrings.tex
+++ b/Doc/lib/libstrings.tex
@@ -4,27 +4,4 @@
The modules described in this chapter provide a wide range of string
manipulation operations. Here's an overview:
-\begin{description}
-
-\item[string]
---- Common string operations.
-
-\item[re]
---- New Perl-style regular expression search and match operations.
-
-\item[regex]
---- Regular expression search and match operations.
-
-\item[regsub]
---- Substitution and splitting operations that use regular expressions.
-
-\item[struct]
---- Interpret strings as packed binary data.
-
-\item[StringIO]
---- Read and write strings as if they were files.
-
-\item[cStringIO]
---- Faster version of \module{StringIO}, but not subclassable.
-
-\end{description}
+\localmoduletable
diff --git a/Doc/lib/libstrio.tex b/Doc/lib/libstrio.tex
index 86ebf46..6b7d2c5 100644
--- a/Doc/lib/libstrio.tex
+++ b/Doc/lib/libstrio.tex
@@ -1,7 +1,9 @@
\section{Standard Module \module{StringIO}}
-\label{module-StringIO}
+\declaremodule{standard}{StringIO}
+
+
+\modulesynopsis{Read and write strings as if they were files.}
-\stmodindex{StringIO}
This module implements a file-like class, \class{StringIO},
that reads and writes a string buffer (also known as \emph{memory
@@ -27,8 +29,10 @@ Free the memory buffer.
\section{Built-in Module \module{cStringIO}}
-\bimodindex{cStringIO}
-\label{module-cStringIO}
+\declaremodule{builtin}{cStringIO}
+
+\modulesynopsis{Faster version of \module{StringIO}, but not subclassable.}
+
% This section was written by Fred L. Drake, Jr. <fdrake@acm.org>
diff --git a/Doc/lib/libstruct.tex b/Doc/lib/libstruct.tex
index 5925328..22595cb 100644
--- a/Doc/lib/libstruct.tex
+++ b/Doc/lib/libstruct.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{struct}}
-\label{module-struct}
-\bimodindex{struct}
+\declaremodule{builtin}{struct}
+
+\modulesynopsis{Interpret strings as packed binary data.}
+
\indexii{C@\C{}}{structures}
This module performs conversions between Python values and C
diff --git a/Doc/lib/libsunaudio.tex b/Doc/lib/libsunaudio.tex
index c43d611..920b048 100644
--- a/Doc/lib/libsunaudio.tex
+++ b/Doc/lib/libsunaudio.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{sunaudiodev}}
-\label{module-sunaudiodev}
-\bimodindex{sunaudiodev}
+\declaremodule{builtin}{sunaudiodev}
+
+\modulesynopsis{None}
+
This module allows you to access the sun audio interface. The sun
audio hardware is capable of recording and playing back audio data
diff --git a/Doc/lib/libsymbol.tex b/Doc/lib/libsymbol.tex
index 0761405..6dbc76e 100644
--- a/Doc/lib/libsymbol.tex
+++ b/Doc/lib/libsymbol.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{symbol}}
-\label{module-symbol}
-\stmodindex{symbol}
+\declaremodule{standard}{symbol}
+
+\modulesynopsis{Constants representing internal nodes of the parse tree.}
+
This module provides constants which represent the numeric values of
internal nodes of the parse tree. Unlike most Python constants, these
diff --git a/Doc/lib/libsys.tex b/Doc/lib/libsys.tex
index d7e8e46..1f37bc8 100644
--- a/Doc/lib/libsys.tex
+++ b/Doc/lib/libsys.tex
@@ -1,7 +1,8 @@
\section{Built-in Module \module{sys}}
-\label{module-sys}
+\declaremodule{builtin}{sys}
+
+\modulesynopsis{Access system specific parameters and functions.}
-\bimodindex{sys}
This module provides access to some variables used or maintained by the
interpreter and to functions that interact strongly with the interpreter.
It is always available.
@@ -13,7 +14,7 @@ It is always available.
dependent whether this is a full pathname or not).
If the command was executed using the \samp{-c} command line option
to the interpreter, \code{argv[0]} is set to the string
- \code{"-c"}.
+ \code{'-c'}.
If no script name was passed to the Python interpreter,
\code{argv} has zero length.
\end{datadesc}
@@ -81,13 +82,13 @@ the other two are undefined.
\begin{datadesc}{exec_prefix}
A string giving the site-specific
directory prefix where the platform-dependent Python files are
-installed; by default, this is also \code{"/usr/local"}. This can be
+installed; by default, this is also \code{'/usr/local'}. This can be
set at build time with the \code{-}\code{-exec-prefix} argument to the
\program{configure} script. Specifically, all configuration files
(e.g. the \file{config.h} header file) are installed in the directory
-\code{exec_prefix + "/lib/python\var{version}/config"}, and shared library
+\code{exec_prefix + '/lib/python\var{version}/config'}, and shared library
modules are installed in
-\code{exec_prefix + "/lib/python\var{version}/lib-dynload"},
+\code{exec_prefix + '/lib/python\var{version}/lib-dynload'},
where \var{version} is equal to \code{version[:3]}.
\end{datadesc}
@@ -116,7 +117,7 @@ interpreter, on systems where this makes sense.
\begin{funcdesc}{getrefcount}{object}
Return the reference count of the \var{object}. The count returned is
generally one higher than you might expect, because it includes the
-(temporary) reference as an argument to \code{getrefcount()}.
+(temporary) reference as an argument to \function{getrefcount()}.
\end{funcdesc}
\begin{datadesc}{last_type}
@@ -157,7 +158,7 @@ complement binary arithmetic.
\begin{datadesc}{path}
\indexiii{module}{search}{path}
A list of strings that specifies the search path for modules.
- Initialized from the environment variable \code{\$PYTHONPATH}, or an
+ Initialized from the environment variable \envvar{PYTHONPATH}, or an
installation-dependent default.
The first item of this list, \code{path[0]}, is the
@@ -167,7 +168,7 @@ interpreter is invoked interactively or if the script is read from
standard input), \code{path[0]} is the empty string, which directs
Python to search modules in the current directory first. Notice that
the script directory is inserted \emph{before} the entries inserted as
-a result of \code{\$PYTHONPATH}.
+a result of \envvar{PYTHONPATH}.
\end{datadesc}
\begin{datadesc}{platform}
@@ -179,12 +180,12 @@ components to \code{path}, for instance.
\begin{datadesc}{prefix}
A string giving the site-specific directory prefix where the platform
independent Python files are installed; by default, this is the string
-\code{"/usr/local"}. This can be set at build time with the
+\code{'/usr/local'}. This can be set at build time with the
\code{-}\code{-prefix} argument to the \program{configure} script. The main
collection of Python library modules is installed in the directory
-\code{prefix + "/lib/python\var{version}"} while the platform
+\code{prefix + '/lib/python\var{version}'} while the platform
independent header files (all except \file{config.h}) are stored in
-\code{prefix + "/include/python\var{version}"},
+\code{prefix + '/include/python\var{version}'},
where \var{version} is equal to \code{version[:3]}.
\end{datadesc}
diff --git a/Doc/lib/libsyslog.tex b/Doc/lib/libsyslog.tex
index 3e5b166..cd32bbf 100644
--- a/Doc/lib/libsyslog.tex
+++ b/Doc/lib/libsyslog.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{syslog}}
-\label{module-syslog}
-\bimodindex{syslog}
+\declaremodule{builtin}{syslog}
+
+\modulesynopsis{An interface to the \UNIX{} syslog library routines.}
+
This module provides an interface to the \UNIX{} \code{syslog} library
routines. Refer to the \UNIX{} manual pages for a detailed description
diff --git a/Doc/lib/libtempfile.tex b/Doc/lib/libtempfile.tex
index 93577e7..dadd357 100644
--- a/Doc/lib/libtempfile.tex
+++ b/Doc/lib/libtempfile.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{tempfile}}
-\label{module-tempfile}
-\stmodindex{tempfile}
+\declaremodule{standard}{tempfile}
+
+\modulesynopsis{Generate temporary file names.}
+
\indexii{temporary}{file name}
\indexii{temporary}{file}
diff --git a/Doc/lib/libtemplate.tex b/Doc/lib/libtemplate.tex
index d190506..e82bb21 100644
--- a/Doc/lib/libtemplate.tex
+++ b/Doc/lib/libtemplate.tex
@@ -4,29 +4,27 @@
% ==== 1. ====
% Choose one of the following section headers and index entries;
-% \section generates the section header,
-% \bimodindex or \stmodindex generates an index entry for this
-% module. Note that these should only be used for the defining entry
-% for the module. Other references to the module should use
-% \refbimodindex, \refstmodindex, \refexmodindex or \refmodindex, as
-% appropriate. (Just prepend "ref" to the csname of the \*modindex
-% macro used in the module definition.)
-%
-% The \label{module-spam} line is for the \seealso command.
+% \section generates the section header, \declmodule produces the
+% appropriate index entry for this module. Note that these should
+% only be used for the defining entry for the module. Other
+% references to the module should use \refbimodindex, \refstmodindex,
+% \refexmodindex or \refmodindex, as appropriate.
\section{Built-in Module \module{spam}} % If implemented in C, in
-\bimodindex{spam} % standard library
+\declaremodule{builtin}{spam} % standard library
\section{Standard Module \module{spam}} % If implemented in Python, in
-\stmodindex{spam} % standard library
+\declaremodule{standard}{spam} % standard library
\section{Extension Module \module{spam}}% If implemented in C, but not
-\exmodindex{spam} % in standard library
+\declaremodule{extension}{spam} % in standard library
\section{Module \module{spam}} % If implemented in Python, but not
-\modindex{spam} % in standard library
+\declaremodule{}{spam} % in standard library
+
+
+\modulesynopsis{This is a one-line descrition, for the chapter header.}
-\label{module-spam}
% ==== 2. ====
% Give a short overview of what the module does.
diff --git a/Doc/lib/libtermios.tex b/Doc/lib/libtermios.tex
index 5e2ce1e..18b63bf 100644
--- a/Doc/lib/libtermios.tex
+++ b/Doc/lib/libtermios.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{termios}}
-\label{module-termios}
-\bimodindex{termios}
+\declaremodule{builtin}{termios}
+
+\modulesynopsis{\POSIX{} style tty control.}
+
\indexii{\POSIX{}}{I/O control}
\indexii{tty}{I/O control}
@@ -93,8 +95,10 @@ def getpass(prompt = "Password: "):
\end{verbatim}
\section{Standard Module \module{TERMIOS}}
-\label{module-TERMIOSuppercase}
-\stmodindex{TERMIOS}
+\declaremodule[TERMIOSuppercase]{standard}{TERMIOS}
+
+\modulesynopsis{The symbolic constants required to use the \module{termios} module.}
+
\indexii{\POSIX{}}{I/O control}
\indexii{tty}{I/O control}
diff --git a/Doc/lib/libthread.tex b/Doc/lib/libthread.tex
index c8d251e..2e55b41 100644
--- a/Doc/lib/libthread.tex
+++ b/Doc/lib/libthread.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{thread}}
-\label{module-thread}
-\bimodindex{thread}
+\declaremodule{builtin}{thread}
+
+\modulesynopsis{Create multiple threads of control within one namespace.}
+
This module provides low-level primitives for working with multiple
threads (a.k.a.\ \dfn{light-weight processes} or \dfn{tasks}) --- multiple
diff --git a/Doc/lib/libthreading.tex b/Doc/lib/libthreading.tex
index f8da0ed..6808ea9 100644
--- a/Doc/lib/libthreading.tex
+++ b/Doc/lib/libthreading.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{threading}}
-\label{module-threading}
-\stmodindex{threading}
+\declaremodule{standard}{threading}
+
+\modulesynopsis{None}
+
This module constructs higher-level threading interfaces on top of the
lower level
diff --git a/Doc/lib/libtime.tex b/Doc/lib/libtime.tex
index 711347b..caafd50 100644
--- a/Doc/lib/libtime.tex
+++ b/Doc/lib/libtime.tex
@@ -1,6 +1,8 @@
\section{Built-in Module \module{time}}
-\label{module-time}
-\bimodindex{time}
+\declaremodule{builtin}{time}
+
+\modulesynopsis{Time access and conversions.}
+
This module provides various time-related functions.
It is always available.
diff --git a/Doc/lib/libtoken.tex b/Doc/lib/libtoken.tex
index 15ab2a4..ce3bd5c 100644
--- a/Doc/lib/libtoken.tex
+++ b/Doc/lib/libtoken.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{token}}
-\label{module-token}
-\stmodindex{token}
+\declaremodule{standard}{token}
+
+\modulesynopsis{Constants representing terminal nodes of the parse tree.}
+
This module provides constants which represent the numeric values of
leaf nodes of the parse tree (terminal tokens). Refer to the file
diff --git a/Doc/lib/libtraceback.tex b/Doc/lib/libtraceback.tex
index 366421a..29c8ac6 100644
--- a/Doc/lib/libtraceback.tex
+++ b/Doc/lib/libtraceback.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{traceback}}
-\label{module-traceback}
-\stmodindex{traceback}
+\declaremodule{standard}{traceback}
+
+\modulesynopsis{Print or retrieve a stack traceback.}
+
This module provides a standard interface to extract, format and print
diff --git a/Doc/lib/libtypes2.tex b/Doc/lib/libtypes2.tex
index a9bba64..07bf35a 100644
--- a/Doc/lib/libtypes2.tex
+++ b/Doc/lib/libtypes2.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{types}}
-\label{module-types}
-\stmodindex{types}
+\declaremodule{standard}{types}
+
+\modulesynopsis{Names for all built-in types.}
+
This module defines names for all object types that are used by the
diff --git a/Doc/lib/libunix.tex b/Doc/lib/libunix.tex
index c836515..686df01 100644
--- a/Doc/lib/libunix.tex
+++ b/Doc/lib/libunix.tex
@@ -5,54 +5,4 @@ The modules described in this chapter provide interfaces to features
that are unique to the \UNIX{} operating system, or in some cases to
some or many variants of it. Here's an overview:
-\begin{description}
-
-\item[posix]
---- The most common \POSIX{} system calls (normally used via module
-\module{os}).
-
-\item[posixpath]
---- Common \POSIX{} pathname manipulations (normally used via \code{os.path}).
-
-\item[pwd]
---- The password database (\function{getpwnam()} and friends).
-
-\item[grp]
---- The group database (\function{getgrnam()} and friends).
-
-\item[crypt]
---- The \cfunction{crypt()} function used to check \UNIX{} passwords.
-
-\item[dbm]
---- The standard ``database'' interface, based on \code{ndbm}.
-
-\item[gdbm]
---- GNU's reinterpretation of dbm.
-
-\item[termios]
---- \POSIX{} style tty control.
-
-\item[TERMIOS]
---- The symbolic constants required to use the \module{termios} module.
-
-\item[fcntl]
---- The \function{fcntl()} and \function{ioctl()} system calls.
-
-\item[posixfile]
---- A file-like object with support for locking.
-
-\item[resource]
---- An interface to provide resource usage information on the current
-process.
-
-\item[syslog]
---- An interface to the \UNIX{} \code{syslog} library routines.
-
-\item[stat]
---- Constants and functions for interpreting the results of
-\function{os.stat()}, \function{os.lstat()} and \function{os.fstat()}.
-
-\item[commands]
---- Wrapper functions for \function{os.popen()}.
-
-\end{description}
+\localmoduletable
diff --git a/Doc/lib/liburllib.tex b/Doc/lib/liburllib.tex
index c53508b..7a98582 100644
--- a/Doc/lib/liburllib.tex
+++ b/Doc/lib/liburllib.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{urllib}}
-\label{module-urllib}
-\stmodindex{urllib}
+\declaremodule{standard}{urllib}
+
+\modulesynopsis{Open an arbitrary object given by URL (requires sockets).}
+
\index{WWW}
\index{World-Wide Web}
\index{URL}
diff --git a/Doc/lib/liburlparse.tex b/Doc/lib/liburlparse.tex
index 3d98688..4c3af7d 100644
--- a/Doc/lib/liburlparse.tex
+++ b/Doc/lib/liburlparse.tex
@@ -1,6 +1,9 @@
\section{Standard Module \module{urlparse}}
-\label{module-urlparse}
-\stmodindex{urlparse}
+\declaremodule{standard}{urlparse}
+
+\modulesynopsis{Parse a URL string into a tuple (addressing scheme identifier, network
+location, path, parameters, query string, fragment identifier).}
+
\index{WWW}
\index{World-Wide Web}
\index{URL}
diff --git a/Doc/lib/libuser.tex b/Doc/lib/libuser.tex
index e545972..5527225 100644
--- a/Doc/lib/libuser.tex
+++ b/Doc/lib/libuser.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{user}}
-\label{module-user}
-\stmodindex{user}
+\declaremodule{standard}{user}
+
+\modulesynopsis{A standard way to reference user-specific modules.}
+
\indexii{.pythonrc.py}{file}
\indexiii{user}{configuration}{file}
diff --git a/Doc/lib/libuserdict.tex b/Doc/lib/libuserdict.tex
index 3bde716..6c29906 100644
--- a/Doc/lib/libuserdict.tex
+++ b/Doc/lib/libuserdict.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{UserDict}}
-\stmodindex{UserDict}
-\label{module-UserDict}
+\declaremodule{standard}{UserDict}
+
+\modulesynopsis{Class wrapper for dictionary objects.}
+
This module defines a class that acts as a wrapper around
dictionary objects. It is a useful base class for
@@ -23,8 +25,10 @@ class.
\section{Standard Module \module{UserList}}
-\stmodindex{UserList}
-\label{module-UserList}
+\declaremodule{standard}{UserList}
+
+\modulesynopsis{Class wrapper for list objects.}
+
This module defines a class that acts as a wrapper around
list objects. It is a useful base class for
diff --git a/Doc/lib/libuu.tex b/Doc/lib/libuu.tex
index 5c9e06c..b052de7 100644
--- a/Doc/lib/libuu.tex
+++ b/Doc/lib/libuu.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{uu}}
-\label{module-uu}
-\stmodindex{uu}
+\declaremodule{standard}{uu}
+
+\modulesynopsis{Encode and decode files in uuencode format.}
+
This module encodes and decodes files in uuencode format, allowing
arbitrary binary data to be transferred over ascii-only connections.
diff --git a/Doc/lib/libwhichdb.tex b/Doc/lib/libwhichdb.tex
index 2caace2..db4f555 100644
--- a/Doc/lib/libwhichdb.tex
+++ b/Doc/lib/libwhichdb.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{whichdb}}
-\label{module-whichdb}
-\stmodindex{whichdb}
+\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
diff --git a/Doc/lib/libwhrandom.tex b/Doc/lib/libwhrandom.tex
index 0645b6f..bc7d402 100644
--- a/Doc/lib/libwhrandom.tex
+++ b/Doc/lib/libwhrandom.tex
@@ -1,6 +1,8 @@
\section{Standard Module \module{whrandom}}
-\label{module-whrandom}
-\stmodindex{whrandom}
+\declaremodule{standard}{whrandom}
+
+\modulesynopsis{Floating point pseudo-random number generator.}
+
This module implements a Wichmann-Hill pseudo-random number generator
class that is also named \code{whrandom}. Instances of the
diff --git a/Doc/lib/libwww.tex b/Doc/lib/libwww.tex
index 143b15d..9d647ff 100644
--- a/Doc/lib/libwww.tex
+++ b/Doc/lib/libwww.tex
@@ -12,97 +12,4 @@ of these modules require the presence of the system-dependent module
\code{sockets}\refbimodindex{socket}, which is currently only fully
supported on \UNIX{} and Windows NT. Here is an overview:
-\begin{description}
-
-\item[cgi]
---- Common Gateway Interface, used to interpret forms in server-side
-scripts.
-
-\item[urllib]
---- Open an arbitrary object given by URL (requires sockets).
-
-\item[httplib]
---- HTTP protocol client (requires sockets).
-
-\item[ftplib]
---- FTP protocol client (requires sockets).
-
-\item[gopherlib]
---- Gopher protocol client (requires sockets).
-
-\item[poplib]
---- POP3 protocol client (requires sockets).
-
-\item[imaplib]
---- IMAP4 protocol client (requires sockets).
-
-\item[nntplib]
---- NNTP protocol client (requires sockets).
-
-\item[smtplib]
---- SMTP protocol client (requires sockets).
-
-\item[urlparse]
---- Parse a URL string into a tuple (addressing scheme identifier, network
-location, path, parameters, query string, fragment identifier).
-
-\item[sgmllib]
---- Only as much of an SGML parser as needed to parse HTML.
-
-\item[htmllib]
---- A parser for HTML documents.
-
-\item[xmllib]
---- A parser for XML documents.
-
-\item[formatter]
---- Generic output formatter and device interface.
-
-\item[rfc822]
---- Parse \rfc{822} style mail headers.
-
-\item[mimetools]
---- Tools for parsing MIME style message bodies.
-
-\item[multifile]
---- Make each part of a MIME multipart message ``feel'' like a regular file.
-
-\item[binhex]
---- Encode and decode files in binhex4 format.
-
-\item[uu]
---- Encode and decode files in uuencode format.
-
-\item[binascii]
---- Tools for converting between binary and various ascii-encoded binary
-representation
-
-\item[xdrlib]
---- The External Data Representation Standard as described in \rfc{1014},
-written by Sun Microsystems, Inc. June 1987.
-
-\item[mailcap]
---- Mailcap file handling. See \rfc{1524}.
-
-\item[mimetypes]
---- Mapping of filename extensions to MIME types.
-
-\item[base64]
---- Encode/decode binary files using the MIME base64 encoding.
-
-\item[quopri]
---- Encode/decode binary files using the MIME quoted-printable encoding.
-
-\item[SocketServer]
---- A framework for network servers.
-
-\item[mailbox]
---- Read various mailbox formats.
-
-\item[mimify]
---- Mimification and unmimification of mail messages.
-
-\item[BaseHTTPServer]
---- Basic HTTP server (base class for SimpleHTTPServer and CGIHTTPServer).
-
-\end{description}
+\localmoduletable
diff --git a/Doc/lib/libxdrlib.tex b/Doc/lib/libxdrlib.tex
index 56459f8..47524c6 100644
--- a/Doc/lib/libxdrlib.tex
+++ b/Doc/lib/libxdrlib.tex
@@ -1,11 +1,13 @@
\section{Standard Module \module{xdrlib}}
-\label{module-xdrlib}
-\stmodindex{xdrlib}
+\declaremodule{standard}{xdrlib}
+
+\modulesynopsis{The External Data Representation Standard as described
+in \rfc{1014}, written by Sun Microsystems, Inc. June 1987.}
+
\index{XDR}
\index{External Data Representation}
-
The \module{xdrlib} module supports the External Data Representation
Standard as described in \rfc{1014}, written by Sun Microsystems,
Inc. June 1987. It supports most of the data types described in the
diff --git a/Doc/lib/libxmllib.tex b/Doc/lib/libxmllib.tex
index 4306aca..129ab17 100644
--- a/Doc/lib/libxmllib.tex
+++ b/Doc/lib/libxmllib.tex
@@ -1,7 +1,9 @@
\section{Standard Module \module{xmllib}}
% Author: Sjoerd Mullender
-\label{module-xmllib}
-\stmodindex{xmllib}
+\declaremodule{standard}{xmllib}
+
+\modulesynopsis{A parser for XML documents.}
+
\index{XML}
This module defines a class \class{XMLParser} which serves as the basis
diff --git a/Doc/lib/libzlib.tex b/Doc/lib/libzlib.tex
index 3838c86..718a3d4 100644
--- a/Doc/lib/libzlib.tex
+++ b/Doc/lib/libzlib.tex
@@ -2,8 +2,10 @@
% hasn't been updated yet
\section{Built-in Module \module{zlib}}
-\label{module-zlib}
-\bimodindex{zlib}
+\declaremodule{builtin}{zlib}
+
+\modulesynopsis{None}
+
For applications that require data compression, the functions in this
module allow compression and decompression, using the zlib library.
diff --git a/Doc/templates/module.tex b/Doc/templates/module.tex
index d190506..e82bb21 100644
--- a/Doc/templates/module.tex
+++ b/Doc/templates/module.tex
@@ -4,29 +4,27 @@
% ==== 1. ====
% Choose one of the following section headers and index entries;
-% \section generates the section header,
-% \bimodindex or \stmodindex generates an index entry for this
-% module. Note that these should only be used for the defining entry
-% for the module. Other references to the module should use
-% \refbimodindex, \refstmodindex, \refexmodindex or \refmodindex, as
-% appropriate. (Just prepend "ref" to the csname of the \*modindex
-% macro used in the module definition.)
-%
-% The \label{module-spam} line is for the \seealso command.
+% \section generates the section header, \declmodule produces the
+% appropriate index entry for this module. Note that these should
+% only be used for the defining entry for the module. Other
+% references to the module should use \refbimodindex, \refstmodindex,
+% \refexmodindex or \refmodindex, as appropriate.
\section{Built-in Module \module{spam}} % If implemented in C, in
-\bimodindex{spam} % standard library
+\declaremodule{builtin}{spam} % standard library
\section{Standard Module \module{spam}} % If implemented in Python, in
-\stmodindex{spam} % standard library
+\declaremodule{standard}{spam} % standard library
\section{Extension Module \module{spam}}% If implemented in C, but not
-\exmodindex{spam} % in standard library
+\declaremodule{extension}{spam} % in standard library
\section{Module \module{spam}} % If implemented in Python, but not
-\modindex{spam} % in standard library
+\declaremodule{}{spam} % in standard library
+
+
+\modulesynopsis{This is a one-line descrition, for the chapter header.}
-\label{module-spam}
% ==== 2. ====
% Give a short overview of what the module does.