blob: c4eaeb68152ab03a3106bf712a8e8fb2a48a9a73 [file] [log] [blame]
Fred Drake88fa9622000-09-11 05:23:25 +00001\chapter{Undocumented Modules \label{undoc}}
Guido van Rossum612316f1997-03-14 04:12:52 +00002
3Here's a quick listing of modules that are currently undocumented, but
4that should be documented. Feel free to contribute documentation for
Fred Drake88fa9622000-09-11 05:23:25 +00005them! (Send via email to \email{python-docs@python.org}.)
6
7The idea and original contents for this chapter were taken
8from a posting by Fredrik Lundh; the specific contents of this chapter
9have been substantially revised.
Guido van Rossum612316f1997-03-14 04:12:52 +000010
11
Fred Drake16e81f41999-02-24 19:57:14 +000012\section{Frameworks}
13
14Frameworks tend to be harder to document, but are well worth the
15effort spent.
Guido van Rossum612316f1997-03-14 04:12:52 +000016
Fred Drake272fb3a1998-04-07 14:15:28 +000017\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +000018\item[\module{Tkinter}]
Fred Drake37f15741999-11-10 16:21:37 +000019--- Interface to Tcl/Tk for graphical user interfaces; Fredrik Lundh
20is working on this one! See
Fred Draked4d4ba31999-12-01 18:44:09 +000021\citetitle[http://www.pythonware.com/library.htm]{An Introduction to
22Tkinter} at \url{http://www.pythonware.com/library.htm} for on-line
Fred Drake6f49e0a1999-06-18 19:58:59 +000023reference material.
Guido van Rossum612316f1997-03-14 04:12:52 +000024
Fred Drakee4694eb1999-07-01 20:42:57 +000025\item[\module{Tkdnd}]
Fred Drake95638f51998-04-14 04:55:43 +000026--- Drag-and-drop support for \module{Tkinter}.
27
Fred Drake38e5d272000-04-03 20:13:55 +000028\item[\module{turtle}]
29--- Turtle graphics in a Tk window.
30
Fred Drakee4694eb1999-07-01 20:42:57 +000031\item[\module{test}]
Fred Drake211f22c1998-08-11 18:13:31 +000032--- Regression testing framework. This is used for the Python
33regression test, but is useful for other Python libraries as well.
Fred Drake88fa9622000-09-11 05:23:25 +000034This is a package rather than a single module.
Fred Drake272fb3a1998-04-07 14:15:28 +000035\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000036
Guido van Rossum612316f1997-03-14 04:12:52 +000037
Guido van Rossum612316f1997-03-14 04:12:52 +000038\section{Miscellaneous useful utilities}
39
Fred Drakeae4d5c21999-06-23 14:56:13 +000040Some of these are very old and/or not very robust; marked with ``hmm.''
Guido van Rossum612316f1997-03-14 04:12:52 +000041
Fred Drake272fb3a1998-04-07 14:15:28 +000042\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +000043\item[\module{bdb}]
Fred Drake88fa9622000-09-11 05:23:25 +000044--- A generic Python debugger base class (used by pdb).
Guido van Rossum612316f1997-03-14 04:12:52 +000045
Fred Drakee4694eb1999-07-01 20:42:57 +000046\item[\module{ihooks}]
Fred Drake88fa9622000-09-11 05:23:25 +000047--- Import hook support (for \refmodule{rexec}; may become obsolete).
Fred Drakebf781a92001-08-14 11:38:35 +000048
49\item[\module{smtpd}]
50--- An SMTP daemon implementation which meets the minimum requirements
51for \rfc{821} conformance.
Fred Drake272fb3a1998-04-07 14:15:28 +000052\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000053
Guido van Rossum90858221997-08-15 02:52:46 +000054
Guido van Rossum612316f1997-03-14 04:12:52 +000055\section{Platform specific modules}
56
Fred Drake6f49e0a1999-06-18 19:58:59 +000057These modules are used to implement the \refmodule{os.path} module,
58and are not documented beyond this mention. There's little need to
59document these.
Fred Drake560bcae1999-02-02 18:59:58 +000060
61\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +000062\item[\module{dospath}]
Fred Drake88fa9622000-09-11 05:23:25 +000063--- Implementation of \module{os.path} on MS-DOS.
Fred Drake560bcae1999-02-02 18:59:58 +000064
Fred Drakee4694eb1999-07-01 20:42:57 +000065\item[\module{ntpath}]
Fred Drake88fa9622000-09-11 05:23:25 +000066--- Implementation on \module{os.path} on Win32, Win64, WinCE, and
67OS/2 platforms.
Fred Drake560bcae1999-02-02 18:59:58 +000068
Fred Drakee4694eb1999-07-01 20:42:57 +000069\item[\module{posixpath}]
Fred Drake88fa9622000-09-11 05:23:25 +000070--- Implementation on \module{os.path} on \POSIX.
Fred Drake272fb3a1998-04-07 14:15:28 +000071\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000072
Guido van Rossum612316f1997-03-14 04:12:52 +000073
Guido van Rossum612316f1997-03-14 04:12:52 +000074\section{Multimedia}
75
Fred Drake272fb3a1998-04-07 14:15:28 +000076\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +000077\item[\module{audiodev}]
Fred Drake88fa9622000-09-11 05:23:25 +000078--- Platform-independent API for playing audio data.
Guido van Rossum612316f1997-03-14 04:12:52 +000079
Fred Drakee4694eb1999-07-01 20:42:57 +000080\item[\module{sunaudio}]
Fred Drake88fa9622000-09-11 05:23:25 +000081--- Interpret Sun audio headers (may become obsolete or a tool/demo).
Guido van Rossum612316f1997-03-14 04:12:52 +000082
Fred Drakee4694eb1999-07-01 20:42:57 +000083\item[\module{toaiff}]
Fred Drake6f49e0a1999-06-18 19:58:59 +000084--- Convert "arbitrary" sound files to AIFF files; should probably
Fred Drakeae4d5c21999-06-23 14:56:13 +000085become a tool or demo. Requires the external program \program{sox}.
Fred Drake272fb3a1998-04-07 14:15:28 +000086\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000087
88
Fred Drake38e5d272000-04-03 20:13:55 +000089\section{Obsolete \label{obsolete-modules}}
Guido van Rossum612316f1997-03-14 04:12:52 +000090
Fred Drake38e5d272000-04-03 20:13:55 +000091These modules are not normally available for import; additional work
92must be done to make them available.
93
94Those which are written in Python will be installed into the directory
95\file{lib-old/} installed as part of the standard library. To use
96these, the directory must be added to \code{sys.path}, possibly using
97\envvar{PYTHONPATH}.
98
99Obsolete extension modules written in C are not built by default.
100Under \UNIX, these must be enabled by uncommenting the appropriate
101lines in \file{Modules/Setup} in the build tree and either rebuilding
102Python if the modules are statically linked, or building and
103installing the shared object if using dynamically-loaded extensions.
104
105% XXX need Windows instructions!
Guido van Rossumcfaf1431997-07-16 15:48:20 +0000106
Fred Drake272fb3a1998-04-07 14:15:28 +0000107\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +0000108\item[\module{addpack}]
Fred Drake88fa9622000-09-11 05:23:25 +0000109--- Alternate approach to packages. Use the built-in package support
110instead.
Guido van Rossum612316f1997-03-14 04:12:52 +0000111
Fred Drakea8052a31999-10-26 16:27:28 +0000112\item[\module{cmp}]
Fred Drake47a27b61999-10-29 17:25:59 +0000113--- File comparison function. Use the newer \refmodule{filecmp} instead.
Fred Drakea8052a31999-10-26 16:27:28 +0000114
115\item[\module{cmpcache}]
116--- Caching version of the obsolete \module{cmp} module. Use the
Fred Drake47a27b61999-10-29 17:25:59 +0000117newer \refmodule{filecmp} instead.
Fred Drakea8052a31999-10-26 16:27:28 +0000118
Fred Drakee4694eb1999-07-01 20:42:57 +0000119\item[\module{codehack}]
Fred Drake9ed1a0a1998-11-02 15:46:21 +0000120--- Extract function name or line number from a function
Fred Drakeae4d5c21999-06-23 14:56:13 +0000121code object (these are now accessible as attributes:
122\member{co.co_name}, \member{func.func_name},
123\member{co.co_firstlineno}).
Fred Drake9ed1a0a1998-11-02 15:46:21 +0000124
Fred Drake2bb43a22000-02-03 15:27:26 +0000125\item[\module{dircmp}]
Fred Drake88fa9622000-09-11 05:23:25 +0000126--- Class to build directory diff tools on (may become a demo or tool).
127\deprecated{2.0}{The \refmodule{filecmp} module replaces
128\module{dircmp}.}
Fred Drake2bb43a22000-02-03 15:27:26 +0000129
Fred Drakee4694eb1999-07-01 20:42:57 +0000130\item[\module{dump}]
Fred Drake88fa9622000-09-11 05:23:25 +0000131--- Print python code that reconstructs a variable.
Fred Drake46e1a321999-06-18 17:12:15 +0000132
Fred Drakee4694eb1999-07-01 20:42:57 +0000133\item[\module{fmt}]
Fred Drake88fa9622000-09-11 05:23:25 +0000134--- Text formatting abstractions (too slow).
Guido van Rossum612316f1997-03-14 04:12:52 +0000135
Fred Drakee4694eb1999-07-01 20:42:57 +0000136\item[\module{lockfile}]
Fred Drake88fa9622000-09-11 05:23:25 +0000137--- Wrapper around FCNTL file locking (use
138\function{fcntl.lockf()}/\function{flock()} instead; see \refmodule{fcntl}).
Guido van Rossum612316f1997-03-14 04:12:52 +0000139
Fred Drakea8052a31999-10-26 16:27:28 +0000140\item[\module{newdir}]
141--- New \function{dir()} function (the standard \function{dir()} is
Fred Drake88fa9622000-09-11 05:23:25 +0000142now just as good).
Fred Drakea8052a31999-10-26 16:27:28 +0000143
144\item[\module{Para}]
Fred Drake88fa9622000-09-11 05:23:25 +0000145--- Helper for \module{fmt}.
Fred Drakea8052a31999-10-26 16:27:28 +0000146
Fred Drakee4694eb1999-07-01 20:42:57 +0000147\item[\module{poly}]
Fred Drake88fa9622000-09-11 05:23:25 +0000148--- Polynomials.
Fred Drake9ed1a0a1998-11-02 15:46:21 +0000149
Fred Drake44774c92000-09-28 05:31:39 +0000150\item[\module{regex}]
151--- Emacs-style regular expression support; may still be used in some
152old code (extension module). Refer to the
153\citetitle[http://www.python.org/doc/1.6/lib/module-regex.html]{Python
1541.6 Documentation} for documentation.
155
156\item[\module{regsub}]
157--- Regular expression based string replacement utilities, for use
158with \module{regex} (extension module). Refer to the
159\citetitle[http://www.python.org/doc/1.6/lib/module-regsub.html]{Python
1601.6 Documentation} for documentation.
161
Fred Drakee4694eb1999-07-01 20:42:57 +0000162\item[\module{tb}]
Fred Drake272fb3a1998-04-07 14:15:28 +0000163--- Print tracebacks, with a dump of local variables (use
Fred Drake88fa9622000-09-11 05:23:25 +0000164\function{pdb.pm()} or \refmodule{traceback} instead).
Guido van Rossum612316f1997-03-14 04:12:52 +0000165
Fred Drakee4694eb1999-07-01 20:42:57 +0000166\item[\module{timing}]
Fred Drake3700b6f1998-08-07 16:02:28 +0000167--- Measure time intervals to high resolution (use
168\function{time.clock()} instead). (This is an extension module.)
Fred Drake9ed1a0a1998-11-02 15:46:21 +0000169
Fred Drake4e6d09e2001-03-20 23:13:53 +0000170\item[\module{tzparse}]
171--- Parse a timezone specification (unfinished; may disappear in the
172future, and does not work when the \envvar{TZ} environment variable is
173not set).
174
Fred Drakee4694eb1999-07-01 20:42:57 +0000175\item[\module{util}]
Fred Drake4d5c87b1999-06-10 21:17:11 +0000176--- Useful functions that don't fit elsewhere.
177
Fred Drakee4694eb1999-07-01 20:42:57 +0000178\item[\module{whatsound}]
Fred Drakee36e4e61999-01-13 17:11:52 +0000179--- Recognize sound files; use \refmodule{sndhdr} instead.
Fred Drake60adb361999-01-05 23:09:12 +0000180
Fred Drakee4694eb1999-07-01 20:42:57 +0000181\item[\module{zmod}]
Fred Drake88fa9622000-09-11 05:23:25 +0000182--- Compute properties of mathematical ``fields.''
Fred Drake272fb3a1998-04-07 14:15:28 +0000183\end{description}
Guido van Rossum61c27031997-07-18 21:08:07 +0000184
Fred Drakee4694eb1999-07-01 20:42:57 +0000185
Fred Drakefffe5db2000-09-21 05:25:30 +0000186The following modules are obsolete, but are likely to re-surface as
187tools or scripts:
Fred Drakee4694eb1999-07-01 20:42:57 +0000188
189\begin{description}
190\item[\module{find}]
Fred Drake88fa9622000-09-11 05:23:25 +0000191--- Find files matching pattern in directory tree.
Fred Drakee4694eb1999-07-01 20:42:57 +0000192
193\item[\module{grep}]
Fred Drake88fa9622000-09-11 05:23:25 +0000194--- \program{grep} implementation in Python.
Fred Drakee4694eb1999-07-01 20:42:57 +0000195
196\item[\module{packmail}]
Fred Drake88fa9622000-09-11 05:23:25 +0000197--- Create a self-unpacking \UNIX{} shell archive.
Fred Drakee4694eb1999-07-01 20:42:57 +0000198\end{description}
199
200
Fred Drake20ca9171998-04-09 14:32:28 +0000201The following modules were documented in previous versions of this
Fred Drakeae4d5c21999-06-23 14:56:13 +0000202manual, but are now considered obsolete. The source for the
203documentation is still available as part of the documentation source
204archive.
Fred Drake20ca9171998-04-09 14:32:28 +0000205
206\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +0000207\item[\module{ni}]
Fred Drake3700b6f1998-08-07 16:02:28 +0000208--- Import modules in ``packages.'' Basic package support is now
Fred Drake88fa9622000-09-11 05:23:25 +0000209built in. The built-in support is very similar to what is provided in
210this module.
Fred Drake20ca9171998-04-09 14:32:28 +0000211
Fred Drakee4694eb1999-07-01 20:42:57 +0000212\item[\module{rand}]
Fred Drake20ca9171998-04-09 14:32:28 +0000213--- Old interface to the random number generator.
214
Fred Drakee4694eb1999-07-01 20:42:57 +0000215\item[\module{soundex}]
Fred Drake20ca9171998-04-09 14:32:28 +0000216--- Algorithm for collapsing names which sound similar to a shared
Fred Drake88fa9622000-09-11 05:23:25 +0000217key. The specific algorithm doesn't seem to match any published
218algorithm. (This is an extension module.)
Fred Drake20ca9171998-04-09 14:32:28 +0000219\end{description}
220
Guido van Rossum612316f1997-03-14 04:12:52 +0000221
Fred Drake88fa9622000-09-11 05:23:25 +0000222\section{SGI-specific Extension modules}
Guido van Rossumb9ee9c21997-06-02 17:34:02 +0000223
Fred Drakeae4d5c21999-06-23 14:56:13 +0000224The following are SGI specific, and may be out of touch with the
225current version of reality.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000226
Fred Drake3700b6f1998-08-07 16:02:28 +0000227\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +0000228\item[\module{cl}]
Fred Drake272fb3a1998-04-07 14:15:28 +0000229--- Interface to the SGI compression library.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000230
Fred Drakee4694eb1999-07-01 20:42:57 +0000231\item[\module{sv}]
Fred Drake272fb3a1998-04-07 14:15:28 +0000232--- Interface to the ``simple video'' board on SGI Indigo
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000233(obsolete hardware).
Fred Drake3700b6f1998-08-07 16:02:28 +0000234\end{description}