blob: 79977bd873b8f17cb67bbc8ff809c3010d1268b8 [file] [log] [blame]
Guido van Rossum612316f1997-03-14 04:12:52 +00001\chapter{Undocumented Modules}
Fred Drake710c0351998-02-18 15:47:17 +00002\label{undoc}
Guido van Rossum612316f1997-03-14 04:12:52 +00003
4Here's a quick listing of modules that are currently undocumented, but
5that should be documented. Feel free to contribute documentation for
Fred Drake16e81f41999-02-24 19:57:14 +00006them! (The idea and original contents for this chapter were taken
7from a posting by Fredrik Lundh; I have revised some modules' status.)
Guido van Rossum612316f1997-03-14 04:12:52 +00008
9
Fred Drake16e81f41999-02-24 19:57:14 +000010\section{Frameworks}
11
12Frameworks tend to be harder to document, but are well worth the
13effort spent.
Guido van Rossum612316f1997-03-14 04:12:52 +000014
Fred Drake272fb3a1998-04-07 14:15:28 +000015\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +000016\item[\module{Tkinter}]
Fred Drake37f15741999-11-10 16:21:37 +000017--- Interface to Tcl/Tk for graphical user interfaces; Fredrik Lundh
18is working on this one! See
Fred Draked4d4ba31999-12-01 18:44:09 +000019\citetitle[http://www.pythonware.com/library.htm]{An Introduction to
20Tkinter} at \url{http://www.pythonware.com/library.htm} for on-line
Fred Drake6f49e0a1999-06-18 19:58:59 +000021reference material.
Guido van Rossum612316f1997-03-14 04:12:52 +000022
Fred Drakee4694eb1999-07-01 20:42:57 +000023\item[\module{Tkdnd}]
Fred Drake95638f51998-04-14 04:55:43 +000024--- Drag-and-drop support for \module{Tkinter}.
25
Fred Drake38e5d272000-04-03 20:13:55 +000026\item[\module{turtle}]
27--- Turtle graphics in a Tk window.
28
Fred Drakee4694eb1999-07-01 20:42:57 +000029\item[\module{test}]
Fred Drake211f22c1998-08-11 18:13:31 +000030--- Regression testing framework. This is used for the Python
31regression test, but is useful for other Python libraries as well.
32This is a package rather than a module.
Fred Drake272fb3a1998-04-07 14:15:28 +000033\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000034
Guido van Rossum612316f1997-03-14 04:12:52 +000035
Guido van Rossum612316f1997-03-14 04:12:52 +000036\section{Miscellaneous useful utilities}
37
Fred Drakeae4d5c21999-06-23 14:56:13 +000038Some of these are very old and/or not very robust; marked with ``hmm.''
Guido van Rossum612316f1997-03-14 04:12:52 +000039
Fred Drake272fb3a1998-04-07 14:15:28 +000040\begin{description}
Fred Drake38e5d272000-04-03 20:13:55 +000041\item[\module{dircmp}]
42--- Class to build directory diff tools on (may become a demo or tool).
Fred Drake30f76ff2000-06-30 16:06:19 +000043\deprecated{2.0}{The \refmodule{filecmp} module will replace
Fred Drake38e5d272000-04-03 20:13:55 +000044\module{dircmp}.}
45
Fred Drakee4694eb1999-07-01 20:42:57 +000046\item[\module{bdb}]
Fred Drake272fb3a1998-04-07 14:15:28 +000047--- A generic Python debugger base class (used by pdb)
Guido van Rossum612316f1997-03-14 04:12:52 +000048
Fred Drakee4694eb1999-07-01 20:42:57 +000049\item[\module{ihooks}]
Fred Drakeae4d5c21999-06-23 14:56:13 +000050--- Import hook support (for \refmodule{rexec}; may become obsolete)
Fred Drakee4694eb1999-07-01 20:42:57 +000051
52\item[\module{tzparse}]
53--- Parse a timezone specification (unfinished; may disappear in the
54future)
Fred Drake272fb3a1998-04-07 14:15:28 +000055\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000056
Guido van Rossum90858221997-08-15 02:52:46 +000057
Guido van Rossum612316f1997-03-14 04:12:52 +000058\section{Platform specific modules}
59
Fred Drake6f49e0a1999-06-18 19:58:59 +000060These modules are used to implement the \refmodule{os.path} module,
61and are not documented beyond this mention. There's little need to
62document these.
Fred Drake560bcae1999-02-02 18:59:58 +000063
64\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +000065\item[\module{dospath}]
Fred Drake560bcae1999-02-02 18:59:58 +000066--- implementation of \module{os.path} on MS-DOS
67
Fred Drakee4694eb1999-07-01 20:42:57 +000068\item[\module{ntpath}]
Fred Drake560bcae1999-02-02 18:59:58 +000069--- implementation on \module{os.path} on 32-bit Windows
70
Fred Drakee4694eb1999-07-01 20:42:57 +000071\item[\module{posixpath}]
Fred Drake560bcae1999-02-02 18:59:58 +000072--- implementation on \module{os.path} on \POSIX{}
Fred Drake272fb3a1998-04-07 14:15:28 +000073\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000074
Guido van Rossum612316f1997-03-14 04:12:52 +000075
Guido van Rossum612316f1997-03-14 04:12:52 +000076\section{Multimedia}
77
Fred Drake272fb3a1998-04-07 14:15:28 +000078\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +000079\item[\module{audiodev}]
Fred Drakeae4d5c21999-06-23 14:56:13 +000080--- Platform-independent API for playing audio data
Guido van Rossum612316f1997-03-14 04:12:52 +000081
Fred Drakee4694eb1999-07-01 20:42:57 +000082\item[\module{sunaudio}]
Fred Drake38e5d272000-04-03 20:13:55 +000083--- Interpret Sun audio headers (may become obsolete or a tool/demo)
Guido van Rossum612316f1997-03-14 04:12:52 +000084
Fred Drakee4694eb1999-07-01 20:42:57 +000085\item[\module{toaiff}]
Fred Drake6f49e0a1999-06-18 19:58:59 +000086--- Convert "arbitrary" sound files to AIFF files; should probably
Fred Drakeae4d5c21999-06-23 14:56:13 +000087become a tool or demo. Requires the external program \program{sox}.
Fred Drake272fb3a1998-04-07 14:15:28 +000088\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000089
90
Fred Drake38e5d272000-04-03 20:13:55 +000091\section{Obsolete \label{obsolete-modules}}
Guido van Rossum612316f1997-03-14 04:12:52 +000092
Fred Drake38e5d272000-04-03 20:13:55 +000093These modules are not normally available for import; additional work
94must be done to make them available.
95
96Those which are written in Python will be installed into the directory
97\file{lib-old/} installed as part of the standard library. To use
98these, the directory must be added to \code{sys.path}, possibly using
99\envvar{PYTHONPATH}.
100
101Obsolete extension modules written in C are not built by default.
102Under \UNIX, these must be enabled by uncommenting the appropriate
103lines in \file{Modules/Setup} in the build tree and either rebuilding
104Python if the modules are statically linked, or building and
105installing the shared object if using dynamically-loaded extensions.
106
107% XXX need Windows instructions!
Guido van Rossumcfaf1431997-07-16 15:48:20 +0000108
Fred Drake272fb3a1998-04-07 14:15:28 +0000109\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +0000110\item[\module{addpack}]
111--- alternate approach to packages
Guido van Rossum612316f1997-03-14 04:12:52 +0000112
Fred Drakea8052a31999-10-26 16:27:28 +0000113\item[\module{cmp}]
Fred Drake47a27b61999-10-29 17:25:59 +0000114--- File comparison function. Use the newer \refmodule{filecmp} instead.
Fred Drakea8052a31999-10-26 16:27:28 +0000115
116\item[\module{cmpcache}]
117--- Caching version of the obsolete \module{cmp} module. Use the
Fred Drake47a27b61999-10-29 17:25:59 +0000118newer \refmodule{filecmp} instead.
Fred Drakea8052a31999-10-26 16:27:28 +0000119
Fred Drakee4694eb1999-07-01 20:42:57 +0000120\item[\module{codehack}]
Fred Drake9ed1a0a1998-11-02 15:46:21 +0000121--- Extract function name or line number from a function
Fred Drakeae4d5c21999-06-23 14:56:13 +0000122code object (these are now accessible as attributes:
123\member{co.co_name}, \member{func.func_name},
124\member{co.co_firstlineno}).
Fred Drake9ed1a0a1998-11-02 15:46:21 +0000125
Fred Drake2bb43a22000-02-03 15:27:26 +0000126\item[\module{dircmp}]
127--- class to build directory diff tools on (may become a demo or tool)
128
Fred Drakee4694eb1999-07-01 20:42:57 +0000129\item[\module{dump}]
Fred Drake46e1a321999-06-18 17:12:15 +0000130--- Print python code that reconstructs a variable
131
Fred Drakee4694eb1999-07-01 20:42:57 +0000132\item[\module{fmt}]
Fred Drake272fb3a1998-04-07 14:15:28 +0000133--- text formatting abstractions (too slow)
Guido van Rossum612316f1997-03-14 04:12:52 +0000134
Fred Drakee4694eb1999-07-01 20:42:57 +0000135\item[\module{lockfile}]
Fred Drake272fb3a1998-04-07 14:15:28 +0000136--- wrapper around FCNTL file locking (use
Thomas Woutersf8316632000-07-16 19:01:10 +0000137\function{fcntl.lockf()}/\function{flock()} instead; see \refmodule{fcntl})
Guido van Rossum612316f1997-03-14 04:12:52 +0000138
Fred Drakea8052a31999-10-26 16:27:28 +0000139\item[\module{newdir}]
140--- New \function{dir()} function (the standard \function{dir()} is
141now just as good)
142
143\item[\module{Para}]
144--- helper for fmt.py
145
Fred Drakee4694eb1999-07-01 20:42:57 +0000146\item[\module{poly}]
Fred Drake9ed1a0a1998-11-02 15:46:21 +0000147--- Polynomials
148
Fred Drakee4694eb1999-07-01 20:42:57 +0000149\item[\module{tb}]
Fred Drake272fb3a1998-04-07 14:15:28 +0000150--- Print tracebacks, with a dump of local variables (use
Fred Drakee36e4e61999-01-13 17:11:52 +0000151\function{pdb.pm()} or \refmodule{traceback} instead)
Guido van Rossum612316f1997-03-14 04:12:52 +0000152
Fred Drakee4694eb1999-07-01 20:42:57 +0000153\item[\module{timing}]
Fred Drake3700b6f1998-08-07 16:02:28 +0000154--- Measure time intervals to high resolution (use
155\function{time.clock()} instead). (This is an extension module.)
Fred Drake9ed1a0a1998-11-02 15:46:21 +0000156
Fred Drakee4694eb1999-07-01 20:42:57 +0000157\item[\module{util}]
Fred Drake4d5c87b1999-06-10 21:17:11 +0000158--- Useful functions that don't fit elsewhere.
159
Fred Drakee4694eb1999-07-01 20:42:57 +0000160\item[\module{wdb}]
Fred Drake6f49e0a1999-06-18 19:58:59 +0000161--- A primitive windowing debugger based on STDWIN.
162
Fred Drakee4694eb1999-07-01 20:42:57 +0000163\item[\module{whatsound}]
Fred Drakee36e4e61999-01-13 17:11:52 +0000164--- Recognize sound files; use \refmodule{sndhdr} instead.
Fred Drake60adb361999-01-05 23:09:12 +0000165
Fred Drakee4694eb1999-07-01 20:42:57 +0000166\item[\module{zmod}]
Fred Drake9ed1a0a1998-11-02 15:46:21 +0000167--- Compute properties of mathematical "fields"
Fred Drake272fb3a1998-04-07 14:15:28 +0000168\end{description}
Guido van Rossum61c27031997-07-18 21:08:07 +0000169
Fred Drakee4694eb1999-07-01 20:42:57 +0000170
171The following modules are obsolete, but are likely re-surface as tools
172or scripts.
173
174\begin{description}
175\item[\module{find}]
176--- find files matching pattern in directory tree
177
178\item[\module{grep}]
179--- grep
180
181\item[\module{packmail}]
182--- create a self-unpacking \UNIX{} shell archive
183\end{description}
184
185
Fred Drake20ca9171998-04-09 14:32:28 +0000186The following modules were documented in previous versions of this
Fred Drakeae4d5c21999-06-23 14:56:13 +0000187manual, but are now considered obsolete. The source for the
188documentation is still available as part of the documentation source
189archive.
Fred Drake20ca9171998-04-09 14:32:28 +0000190
191\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +0000192\item[\module{ni}]
Fred Drake3700b6f1998-08-07 16:02:28 +0000193--- Import modules in ``packages.'' Basic package support is now
194built in.
Fred Drake20ca9171998-04-09 14:32:28 +0000195
Fred Drakee4694eb1999-07-01 20:42:57 +0000196\item[\module{rand}]
Fred Drake20ca9171998-04-09 14:32:28 +0000197--- Old interface to the random number generator.
198
Fred Drakee4694eb1999-07-01 20:42:57 +0000199\item[\module{soundex}]
Fred Drake20ca9171998-04-09 14:32:28 +0000200--- Algorithm for collapsing names which sound similar to a shared
201key. (This is an extension module.)
202\end{description}
203
Guido van Rossum612316f1997-03-14 04:12:52 +0000204
205\section{Extension modules}
206
Fred Drake272fb3a1998-04-07 14:15:28 +0000207\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +0000208\item[\module{stdwin}]
Fred Drake272fb3a1998-04-07 14:15:28 +0000209--- Interface to STDWIN (an old, unsupported
Fred Drakee4694eb1999-07-01 20:42:57 +0000210platform-independent GUI package). Obsolete; use \module{Tkinter} for
211a platform-independent GUI instead.
Fred Drake3700b6f1998-08-07 16:02:28 +0000212\end{description}
Guido van Rossumb9ee9c21997-06-02 17:34:02 +0000213
Fred Drakeae4d5c21999-06-23 14:56:13 +0000214The following are SGI specific, and may be out of touch with the
215current version of reality.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000216
Fred Drake3700b6f1998-08-07 16:02:28 +0000217\begin{description}
Fred Drakee4694eb1999-07-01 20:42:57 +0000218\item[\module{cl}]
Fred Drake272fb3a1998-04-07 14:15:28 +0000219--- Interface to the SGI compression library.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000220
Fred Drakee4694eb1999-07-01 20:42:57 +0000221\item[\module{sv}]
Fred Drake272fb3a1998-04-07 14:15:28 +0000222--- Interface to the ``simple video'' board on SGI Indigo
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000223(obsolete hardware).
Fred Drake3700b6f1998-08-07 16:02:28 +0000224\end{description}