blob: fabe80e8737b10b09ce2cb4d689c57945172f312 [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 Drake9d843082003-07-30 02:55:28 +00005them! (Send via email to \email{docs@python.org}.)
Fred Drake88fa9622000-09-11 05:23:25 +00006
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}
Andrew M. Kuchling32dbdda2004-08-07 19:21:59 +000018\item None at this time.
Fred Drake272fb3a1998-04-07 14:15:28 +000019\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000020
Guido van Rossum612316f1997-03-14 04:12:52 +000021
Guido van Rossum612316f1997-03-14 04:12:52 +000022\section{Miscellaneous useful utilities}
23
Fred Drakeae4d5c21999-06-23 14:56:13 +000024Some of these are very old and/or not very robust; marked with ``hmm.''
Guido van Rossum612316f1997-03-14 04:12:52 +000025
Fred Drake272fb3a1998-04-07 14:15:28 +000026\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +000027\item[\module{bdb}]
Fred Drake88fa9622000-09-11 05:23:25 +000028--- A generic Python debugger base class (used by pdb).
Guido van Rossum612316f1997-03-14 04:12:52 +000029
Fred Drakee4694eb1999-07-01 20:42:57 +000030\item[\module{ihooks}]
Fred Drake88fa9622000-09-11 05:23:25 +000031--- Import hook support (for \refmodule{rexec}; may become obsolete).
Fred Drake272fb3a1998-04-07 14:15:28 +000032\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000033
Guido van Rossum90858221997-08-15 02:52:46 +000034
Andrew M. Kuchling32dbdda2004-08-07 19:21:59 +000035
Guido van Rossum612316f1997-03-14 04:12:52 +000036\section{Platform specific modules}
37
Fred Drake6f49e0a1999-06-18 19:58:59 +000038These modules are used to implement the \refmodule{os.path} module,
39and are not documented beyond this mention. There's little need to
40document these.
Fred Drake560bcae1999-02-02 18:59:58 +000041
42\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +000043\item[\module{ntpath}]
Fred Drake8b6ed262003-05-09 15:04:56 +000044--- Implementation of \module{os.path} on Win32, Win64, WinCE, and
Fred Drake88fa9622000-09-11 05:23:25 +000045OS/2 platforms.
Fred Drake560bcae1999-02-02 18:59:58 +000046
Fred Drakee4694eb1999-07-01 20:42:57 +000047\item[\module{posixpath}]
Fred Drake8b6ed262003-05-09 15:04:56 +000048--- Implementation of \module{os.path} on \POSIX.
Guido van Rossum612316f1997-03-14 04:12:52 +000049
Skip Montanaro6d9f45b2003-05-06 20:40:17 +000050\item[\module{bsddb185}]
51--- Backwards compatibility module for systems which still use the Berkeley
52DB 1.85 module. It is normally only available on certain BSD Unix-based
53systems. It should never be used directly.
54\end{description}
55
Guido van Rossum612316f1997-03-14 04:12:52 +000056
Guido van Rossum612316f1997-03-14 04:12:52 +000057\section{Multimedia}
58
Fred Drake272fb3a1998-04-07 14:15:28 +000059\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +000060\item[\module{audiodev}]
Fred Drake88fa9622000-09-11 05:23:25 +000061--- Platform-independent API for playing audio data.
Guido van Rossum612316f1997-03-14 04:12:52 +000062
Fred Drake326c72a2003-01-08 07:21:53 +000063\item[\module{linuxaudiodev}]
64--- Play audio data on the Linux audio device. Replaced in Python 2.3
65by the \module{ossaudiodev} module.
66
Fred Drakee4694eb1999-07-01 20:42:57 +000067\item[\module{sunaudio}]
Fred Drake88fa9622000-09-11 05:23:25 +000068--- Interpret Sun audio headers (may become obsolete or a tool/demo).
Guido van Rossum612316f1997-03-14 04:12:52 +000069
Fred Drakee4694eb1999-07-01 20:42:57 +000070\item[\module{toaiff}]
Fred Drake6f49e0a1999-06-18 19:58:59 +000071--- Convert "arbitrary" sound files to AIFF files; should probably
Fred Drakeae4d5c21999-06-23 14:56:13 +000072become a tool or demo. Requires the external program \program{sox}.
Fred Drake326c72a2003-01-08 07:21:53 +000073
74\item[\module{ossaudiodev}]
75--- Play audio data via the Open Sound System API. This is usable on
76Linux, some flavors of BSD, and some commercial \UNIX{} platforms.
Fred Drake272fb3a1998-04-07 14:15:28 +000077\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000078
79
Fred Drake38e5d272000-04-03 20:13:55 +000080\section{Obsolete \label{obsolete-modules}}
Guido van Rossum612316f1997-03-14 04:12:52 +000081
Fred Drake38e5d272000-04-03 20:13:55 +000082These modules are not normally available for import; additional work
83must be done to make them available.
84
85Those which are written in Python will be installed into the directory
86\file{lib-old/} installed as part of the standard library. To use
87these, the directory must be added to \code{sys.path}, possibly using
88\envvar{PYTHONPATH}.
89
90Obsolete extension modules written in C are not built by default.
91Under \UNIX, these must be enabled by uncommenting the appropriate
92lines in \file{Modules/Setup} in the build tree and either rebuilding
93Python if the modules are statically linked, or building and
94installing the shared object if using dynamically-loaded extensions.
95
96% XXX need Windows instructions!
Guido van Rossumcfaf1431997-07-16 15:48:20 +000097
Fred Drake272fb3a1998-04-07 14:15:28 +000098\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +000099\item[\module{addpack}]
Fred Drake88fa9622000-09-11 05:23:25 +0000100--- Alternate approach to packages. Use the built-in package support
101instead.
Guido van Rossum612316f1997-03-14 04:12:52 +0000102
Fred Drakea8052a31999-10-26 16:27:28 +0000103\item[\module{cmp}]
Fred Drake47a27b61999-10-29 17:25:59 +0000104--- File comparison function. Use the newer \refmodule{filecmp} instead.
Fred Drakea8052a31999-10-26 16:27:28 +0000105
106\item[\module{cmpcache}]
107--- Caching version of the obsolete \module{cmp} module. Use the
Fred Drake47a27b61999-10-29 17:25:59 +0000108newer \refmodule{filecmp} instead.
Fred Drakea8052a31999-10-26 16:27:28 +0000109
Fred Drakee4694eb1999-07-01 20:42:57 +0000110\item[\module{codehack}]
Fred Drake9ed1a0af1998-11-02 15:46:21 +0000111--- Extract function name or line number from a function
Fred Drakeae4d5c21999-06-23 14:56:13 +0000112code object (these are now accessible as attributes:
113\member{co.co_name}, \member{func.func_name},
114\member{co.co_firstlineno}).
Fred Drake9ed1a0af1998-11-02 15:46:21 +0000115
Fred Drake2bb43a22000-02-03 15:27:26 +0000116\item[\module{dircmp}]
Fred Drake88fa9622000-09-11 05:23:25 +0000117--- Class to build directory diff tools on (may become a demo or tool).
118\deprecated{2.0}{The \refmodule{filecmp} module replaces
119\module{dircmp}.}
Fred Drake2bb43a22000-02-03 15:27:26 +0000120
Fred Drakee4694eb1999-07-01 20:42:57 +0000121\item[\module{dump}]
Fred Drake88fa9622000-09-11 05:23:25 +0000122--- Print python code that reconstructs a variable.
Fred Drake46e1a321999-06-18 17:12:15 +0000123
Fred Drakee4694eb1999-07-01 20:42:57 +0000124\item[\module{fmt}]
Fred Drake88fa9622000-09-11 05:23:25 +0000125--- Text formatting abstractions (too slow).
Guido van Rossum612316f1997-03-14 04:12:52 +0000126
Fred Drakee4694eb1999-07-01 20:42:57 +0000127\item[\module{lockfile}]
Fred Drake88fa9622000-09-11 05:23:25 +0000128--- Wrapper around FCNTL file locking (use
129\function{fcntl.lockf()}/\function{flock()} instead; see \refmodule{fcntl}).
Guido van Rossum612316f1997-03-14 04:12:52 +0000130
Fred Drakea8052a31999-10-26 16:27:28 +0000131\item[\module{newdir}]
132--- New \function{dir()} function (the standard \function{dir()} is
Fred Drake88fa9622000-09-11 05:23:25 +0000133now just as good).
Fred Drakea8052a31999-10-26 16:27:28 +0000134
135\item[\module{Para}]
Fred Drake88fa9622000-09-11 05:23:25 +0000136--- Helper for \module{fmt}.
Fred Drakea8052a31999-10-26 16:27:28 +0000137
Fred Drakee4694eb1999-07-01 20:42:57 +0000138\item[\module{poly}]
Fred Drake88fa9622000-09-11 05:23:25 +0000139--- Polynomials.
Fred Drake9ed1a0af1998-11-02 15:46:21 +0000140
Fred Drake44774c92000-09-28 05:31:39 +0000141\item[\module{regex}]
142--- Emacs-style regular expression support; may still be used in some
143old code (extension module). Refer to the
144\citetitle[http://www.python.org/doc/1.6/lib/module-regex.html]{Python
1451.6 Documentation} for documentation.
146
147\item[\module{regsub}]
148--- Regular expression based string replacement utilities, for use
149with \module{regex} (extension module). Refer to the
150\citetitle[http://www.python.org/doc/1.6/lib/module-regsub.html]{Python
1511.6 Documentation} for documentation.
152
Fred Drakee4694eb1999-07-01 20:42:57 +0000153\item[\module{tb}]
Fred Drake272fb3a1998-04-07 14:15:28 +0000154--- Print tracebacks, with a dump of local variables (use
Fred Drake88fa9622000-09-11 05:23:25 +0000155\function{pdb.pm()} or \refmodule{traceback} instead).
Guido van Rossum612316f1997-03-14 04:12:52 +0000156
Fred Drakee4694eb1999-07-01 20:42:57 +0000157\item[\module{timing}]
Fred Drake3700b6f1998-08-07 16:02:28 +0000158--- Measure time intervals to high resolution (use
159\function{time.clock()} instead). (This is an extension module.)
Fred Drake9ed1a0af1998-11-02 15:46:21 +0000160
Fred Drake4e6d09e2001-03-20 23:13:53 +0000161\item[\module{tzparse}]
162--- Parse a timezone specification (unfinished; may disappear in the
163future, and does not work when the \envvar{TZ} environment variable is
164not set).
165
Fred Drakee4694eb1999-07-01 20:42:57 +0000166\item[\module{util}]
Fred Drake4d5c87b1999-06-10 21:17:11 +0000167--- Useful functions that don't fit elsewhere.
168
Fred Drakee4694eb1999-07-01 20:42:57 +0000169\item[\module{whatsound}]
Fred Drakee36e4e61999-01-13 17:11:52 +0000170--- Recognize sound files; use \refmodule{sndhdr} instead.
Fred Drake60adb361999-01-05 23:09:12 +0000171
Fred Drakee4694eb1999-07-01 20:42:57 +0000172\item[\module{zmod}]
Fred Drake88fa9622000-09-11 05:23:25 +0000173--- Compute properties of mathematical ``fields.''
Fred Drake272fb3a1998-04-07 14:15:28 +0000174\end{description}
Guido van Rossum61c27031997-07-18 21:08:07 +0000175
Fred Drakee4694eb1999-07-01 20:42:57 +0000176
Fred Drakefffe5db2000-09-21 05:25:30 +0000177The following modules are obsolete, but are likely to re-surface as
178tools or scripts:
Fred Drakee4694eb1999-07-01 20:42:57 +0000179
180\begin{description}
181\item[\module{find}]
Fred Drake88fa9622000-09-11 05:23:25 +0000182--- Find files matching pattern in directory tree.
Fred Drakee4694eb1999-07-01 20:42:57 +0000183
184\item[\module{grep}]
Fred Drake88fa9622000-09-11 05:23:25 +0000185--- \program{grep} implementation in Python.
Fred Drakee4694eb1999-07-01 20:42:57 +0000186
187\item[\module{packmail}]
Fred Drake88fa9622000-09-11 05:23:25 +0000188--- Create a self-unpacking \UNIX{} shell archive.
Fred Drakee4694eb1999-07-01 20:42:57 +0000189\end{description}
190
191
Fred Drake20ca9171998-04-09 14:32:28 +0000192The following modules were documented in previous versions of this
Fred Drakeae4d5c21999-06-23 14:56:13 +0000193manual, but are now considered obsolete. The source for the
194documentation is still available as part of the documentation source
195archive.
Fred Drake20ca9171998-04-09 14:32:28 +0000196
197\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +0000198\item[\module{ni}]
Fred Drake3700b6f1998-08-07 16:02:28 +0000199--- Import modules in ``packages.'' Basic package support is now
Fred Drake88fa9622000-09-11 05:23:25 +0000200built in. The built-in support is very similar to what is provided in
201this module.
Fred Drake20ca9171998-04-09 14:32:28 +0000202
Fred Drakee4694eb1999-07-01 20:42:57 +0000203\item[\module{rand}]
Fred Drake20ca9171998-04-09 14:32:28 +0000204--- Old interface to the random number generator.
205
Fred Drakee4694eb1999-07-01 20:42:57 +0000206\item[\module{soundex}]
Fred Drake20ca9171998-04-09 14:32:28 +0000207--- Algorithm for collapsing names which sound similar to a shared
Fred Drake88fa9622000-09-11 05:23:25 +0000208key. The specific algorithm doesn't seem to match any published
209algorithm. (This is an extension module.)
Fred Drake20ca9171998-04-09 14:32:28 +0000210\end{description}
211
Guido van Rossum612316f1997-03-14 04:12:52 +0000212
Fred Drake88fa9622000-09-11 05:23:25 +0000213\section{SGI-specific Extension modules}
Guido van Rossumb9ee9c21997-06-02 17:34:02 +0000214
Fred Drakeae4d5c21999-06-23 14:56:13 +0000215The following are SGI specific, and may be out of touch with the
216current version of reality.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000217
Fred Drake3700b6f1998-08-07 16:02:28 +0000218\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +0000219\item[\module{cl}]
Fred Drake272fb3a1998-04-07 14:15:28 +0000220--- Interface to the SGI compression library.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000221
Fred Drakee4694eb1999-07-01 20:42:57 +0000222\item[\module{sv}]
Fred Drake272fb3a1998-04-07 14:15:28 +0000223--- Interface to the ``simple video'' board on SGI Indigo
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000224(obsolete hardware).
Fred Drake3700b6f1998-08-07 16:02:28 +0000225\end{description}