blob: cfa84450a40cb8e79b76a0146dd29a717d2494a3 [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}
16\item[Tkinter.py]
17--- Interface to Tcl/Tk for graphical user interfaces;
Fred Drakedac9a4e1999-04-16 18:26:22 +000018Fredrik Lundh is working on this one! See \emph{An Introduction to
19Tkinter} at
20\url{http://www.pythonware.com/library/tkinter/introduction} for
21on-line reference material.
Guido van Rossum612316f1997-03-14 04:12:52 +000022
Fred Drake95638f51998-04-14 04:55:43 +000023\item[Tkdnd.py]
24--- Drag-and-drop support for \module{Tkinter}.
25
Fred Drake272fb3a1998-04-07 14:15:28 +000026\item[CGIHTTPServer.py]
27--- CGI-savvy HTTP Server
Guido van Rossum612316f1997-03-14 04:12:52 +000028
Fred Drake272fb3a1998-04-07 14:15:28 +000029\item[SimpleHTTPServer.py]
30--- Simple HTTP Server
Fred Drake211f22c1998-08-11 18:13:31 +000031
32\item[test]
33--- Regression testing framework. This is used for the Python
34regression test, but is useful for other Python libraries as well.
35This is a package rather than a module.
Fred Drake272fb3a1998-04-07 14:15:28 +000036\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000037
Guido van Rossum612316f1997-03-14 04:12:52 +000038
Guido van Rossum612316f1997-03-14 04:12:52 +000039\section{Miscellaneous useful utilities}
40
41Some of these are very old and/or not very robust; marked with ``hmm''.
42
Fred Drake272fb3a1998-04-07 14:15:28 +000043\begin{description}
Fred Drake272fb3a1998-04-07 14:15:28 +000044\item[cmp.py]
45--- Efficiently compare files
Guido van Rossum612316f1997-03-14 04:12:52 +000046
Fred Drake272fb3a1998-04-07 14:15:28 +000047\item[cmpcache.py]
48--- Efficiently compare files (uses statcache)
Guido van Rossum612316f1997-03-14 04:12:52 +000049
Fred Drake272fb3a1998-04-07 14:15:28 +000050\item[dircache.py]
51--- like os.listdir, but caches results
Guido van Rossum612316f1997-03-14 04:12:52 +000052
Fred Drake272fb3a1998-04-07 14:15:28 +000053\item[dircmp.py]
54--- class to build directory diff tools on
Guido van Rossum612316f1997-03-14 04:12:52 +000055
Fred Drake272fb3a1998-04-07 14:15:28 +000056\item[linecache.py]
57--- Cache lines from files (used by pdb)
Guido van Rossum612316f1997-03-14 04:12:52 +000058
Fred Drake272fb3a1998-04-07 14:15:28 +000059\item[pipes.py]
60--- Conversion pipeline templates (hmm)
Guido van Rossum612316f1997-03-14 04:12:52 +000061
Fred Drake272fb3a1998-04-07 14:15:28 +000062\item[statcache.py]
63--- Maintain a cache of file stats
Guido van Rossum612316f1997-03-14 04:12:52 +000064
Fred Drake272fb3a1998-04-07 14:15:28 +000065\item[colorsys.py]
66--- Conversion between RGB and other color systems
Guido van Rossum612316f1997-03-14 04:12:52 +000067
Fred Drake272fb3a1998-04-07 14:15:28 +000068\item[mhlib.py]
69--- MH interface
Guido van Rossum612316f1997-03-14 04:12:52 +000070
Fred Drake272fb3a1998-04-07 14:15:28 +000071\item[pty.py]
72--- Pseudo terminal utilities
Guido van Rossum612316f1997-03-14 04:12:52 +000073
Fred Drake272fb3a1998-04-07 14:15:28 +000074\item[tty.py]
75--- Terminal utilities
Guido van Rossum612316f1997-03-14 04:12:52 +000076
Fred Drake272fb3a1998-04-07 14:15:28 +000077\item[bdb.py]
78--- A generic Python debugger base class (used by pdb)
Guido van Rossum612316f1997-03-14 04:12:52 +000079
Fred Drake6b9ff721998-04-07 19:09:32 +000080\item[wdb.py]
81--- A primitive windowing debugger based on STDWIN.
82
Fred Drake272fb3a1998-04-07 14:15:28 +000083\item[ihooks.py]
84--- Import hook support (for rexec)
Fred Drake272fb3a1998-04-07 14:15:28 +000085\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000086
Guido van Rossum90858221997-08-15 02:52:46 +000087
Guido van Rossum612316f1997-03-14 04:12:52 +000088\section{Platform specific modules}
89
Guido van Rossum612316f1997-03-14 04:12:52 +000090
Fred Drake560bcae1999-02-02 18:59:58 +000091These modules are used to implement the \refmodule{os.path} module, and
92are not documented beyond this mention.
93
94\begin{description}
Fred Drake272fb3a1998-04-07 14:15:28 +000095\item[dospath.py]
Fred Drake560bcae1999-02-02 18:59:58 +000096--- implementation of \module{os.path} on MS-DOS
97
98\item[ntpath.py]
99--- implementation on \module{os.path} on 32-bit Windows
100
101\item[posixpath.py]
102--- implementation on \module{os.path} on \POSIX{}
Fred Drake272fb3a1998-04-07 14:15:28 +0000103\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +0000104
Guido van Rossum612316f1997-03-14 04:12:52 +0000105
Guido van Rossum612316f1997-03-14 04:12:52 +0000106\section{Multimedia}
107
Fred Drake272fb3a1998-04-07 14:15:28 +0000108\begin{description}
109\item[audiodev.py]
110--- Plays audio files
Guido van Rossum612316f1997-03-14 04:12:52 +0000111
Fred Drake272fb3a1998-04-07 14:15:28 +0000112\item[sunau.py]
113--- parse Sun and NeXT audio files
Guido van Rossum612316f1997-03-14 04:12:52 +0000114
Fred Drake272fb3a1998-04-07 14:15:28 +0000115\item[sunaudio.py]
116--- interpret sun audio headers
Guido van Rossum612316f1997-03-14 04:12:52 +0000117
Fred Drake272fb3a1998-04-07 14:15:28 +0000118\item[toaiff.py]
119--- Convert "arbitrary" sound files to AIFF files
Guido van Rossum612316f1997-03-14 04:12:52 +0000120
Fred Drake272fb3a1998-04-07 14:15:28 +0000121\item[wave.py]
122--- parse WAVE files
Fred Drake272fb3a1998-04-07 14:15:28 +0000123\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +0000124
125
126\section{Oddities}
127
128These modules are probably also obsolete, or just not very useful.
129
Fred Drake272fb3a1998-04-07 14:15:28 +0000130\begin{description}
131\item[dump.py]
132--- Print python code that reconstructs a variable
Guido van Rossum612316f1997-03-14 04:12:52 +0000133
Fred Drake272fb3a1998-04-07 14:15:28 +0000134\item[find.py]
135--- find files matching pattern in directory tree
Guido van Rossum612316f1997-03-14 04:12:52 +0000136
Fred Drake272fb3a1998-04-07 14:15:28 +0000137\item[fpformat.py]
138--- General floating point formatting functions ---
Fred Drake71c1e501998-04-04 07:03:19 +0000139interesting demonstration of how to do this without using the \C{}
140library
Guido van Rossum612316f1997-03-14 04:12:52 +0000141
Fred Drake272fb3a1998-04-07 14:15:28 +0000142\item[grep.py]
143--- grep
Guido van Rossum612316f1997-03-14 04:12:52 +0000144
Fred Drake272fb3a1998-04-07 14:15:28 +0000145\item[mutex.py]
146--- Mutual exclusion --- for use with module sched
Guido van Rossum612316f1997-03-14 04:12:52 +0000147
Fred Drake272fb3a1998-04-07 14:15:28 +0000148\item[packmail.py]
149--- create a self-unpacking \UNIX{} shell archive
Guido van Rossum612316f1997-03-14 04:12:52 +0000150
Fred Drake272fb3a1998-04-07 14:15:28 +0000151\item[sched.py]
152--- event scheduler class
Guido van Rossum612316f1997-03-14 04:12:52 +0000153
Fred Drake272fb3a1998-04-07 14:15:28 +0000154\item[util.py]
155--- useful functions that don't fit elsewhere
Guido van Rossum612316f1997-03-14 04:12:52 +0000156
Fred Drake272fb3a1998-04-07 14:15:28 +0000157\item[tzparse.py]
158--- Parse a timezone specification (unfinished)
159\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +0000160
161
162\section{Obsolete}
163
Fred Drake71c1e501998-04-04 07:03:19 +0000164These modules are not on the standard module search path;
165\indexiii{module}{search}{path}
166but are available in the directory \file{lib-old/} installed under
Fred Drake3700b6f1998-08-07 16:02:28 +0000167\file{\textrm{\$prefix}/lib/python1.5/}. % $ <-- bow to font lock
168To use any of these modules, add that directory to \code{sys.path},
169possibly using \envvar{PYTHONPATH}.
Guido van Rossumcfaf1431997-07-16 15:48:20 +0000170
Fred Drake272fb3a1998-04-07 14:15:28 +0000171\begin{description}
172\item[newdir.py]
173--- New dir() function (the standard dir() is now just as good)
Guido van Rossum612316f1997-03-14 04:12:52 +0000174
Fred Drake272fb3a1998-04-07 14:15:28 +0000175\item[addpack.py]
176--- standard support for "packages"
Guido van Rossum612316f1997-03-14 04:12:52 +0000177
Fred Drake9ed1a0a1998-11-02 15:46:21 +0000178\item[codehack.py]
179--- Extract function name or line number from a function
180code object (these are now accessible as attributes: co.co_name,
181func.func_name, co.co_firstlineno).
182
Fred Drake272fb3a1998-04-07 14:15:28 +0000183\item[fmt.py]
184--- text formatting abstractions (too slow)
Guido van Rossum612316f1997-03-14 04:12:52 +0000185
Fred Drake272fb3a1998-04-07 14:15:28 +0000186\item[Para.py]
187--- helper for fmt.py
Fred Drake71c1e501998-04-04 07:03:19 +0000188
Fred Drake272fb3a1998-04-07 14:15:28 +0000189\item[lockfile.py]
190--- wrapper around FCNTL file locking (use
Fred Drake3700b6f1998-08-07 16:02:28 +0000191\function{fcntl.lockf()}/\function{flock()} intead)
Guido van Rossum612316f1997-03-14 04:12:52 +0000192
Fred Drake9ed1a0a1998-11-02 15:46:21 +0000193\item[poly.py]
194--- Polynomials
195
Fred Drake272fb3a1998-04-07 14:15:28 +0000196\item[tb.py]
197--- Print tracebacks, with a dump of local variables (use
Fred Drakee36e4e61999-01-13 17:11:52 +0000198\function{pdb.pm()} or \refmodule{traceback} instead)
Guido van Rossum612316f1997-03-14 04:12:52 +0000199
Fred Drake3700b6f1998-08-07 16:02:28 +0000200\item[timingmodule]
201--- Measure time intervals to high resolution (use
202\function{time.clock()} instead). (This is an extension module.)
Fred Drake9ed1a0a1998-11-02 15:46:21 +0000203
Fred Drake60adb361999-01-05 23:09:12 +0000204\item[whatsound.py]
Fred Drakee36e4e61999-01-13 17:11:52 +0000205--- Recognize sound files; use \refmodule{sndhdr} instead.
Fred Drake60adb361999-01-05 23:09:12 +0000206
Fred Drake9ed1a0a1998-11-02 15:46:21 +0000207\item[zmod.py]
208--- Compute properties of mathematical "fields"
Fred Drake272fb3a1998-04-07 14:15:28 +0000209\end{description}
Guido van Rossum61c27031997-07-18 21:08:07 +0000210
Fred Drake20ca9171998-04-09 14:32:28 +0000211The following modules were documented in previous versions of this
212manual, but are now considered obsolete:
213
214\begin{description}
215\item[ni]
Fred Drake3700b6f1998-08-07 16:02:28 +0000216--- Import modules in ``packages.'' Basic package support is now
217built in.
Fred Drake20ca9171998-04-09 14:32:28 +0000218
219\item[rand]
220--- Old interface to the random number generator.
221
222\item[soundex]
223--- Algorithm for collapsing names which sound similar to a shared
224key. (This is an extension module.)
225\end{description}
226
Guido van Rossum612316f1997-03-14 04:12:52 +0000227
228\section{Extension modules}
229
Fred Drake272fb3a1998-04-07 14:15:28 +0000230\begin{description}
231\item[bsddbmodule.c]
232--- Interface to the Berkeley DB interface (yet another
Fred Drake0ebd5481999-04-15 16:05:29 +0000233dbm clone). See \refmodule{dbhash} for a DBM-style interface.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000234
Fred Drake272fb3a1998-04-07 14:15:28 +0000235\item[cursesmodule.c]
236--- Curses interface.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000237
Fred Drake272fb3a1998-04-07 14:15:28 +0000238\item[dlmodule.c]
239--- A highly experimental and dangerous device for calling
Fred Drake3700b6f1998-08-07 16:02:28 +0000240arbitrary \C{} functions in arbitrary shared libraries.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000241
Fred Drake272fb3a1998-04-07 14:15:28 +0000242\item[newmodule.c]
Fred Drake3700b6f1998-08-07 16:02:28 +0000243--- Tommy Burnette's \module{new} module (creates new empty objects of
Fred Drake272fb3a1998-04-07 14:15:28 +0000244certain kinds) --- dangerous.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000245
Fred Drake272fb3a1998-04-07 14:15:28 +0000246\item[nismodule.c]
247--- NIS (a.k.a. Sun's Yellow Pages) interface.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000248
Fred Drake272fb3a1998-04-07 14:15:28 +0000249\item[stdwinmodule.c]
250--- Interface to STDWIN (an old, unsupported
Guido van Rossumb9ee9c21997-06-02 17:34:02 +0000251platform-independent GUI package). Obsolete; use Tkinter for a
252platform-independent GUI instead.
Fred Drake3700b6f1998-08-07 16:02:28 +0000253\end{description}
Guido van Rossumb9ee9c21997-06-02 17:34:02 +0000254
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000255The following are SGI specific:
256
Fred Drake3700b6f1998-08-07 16:02:28 +0000257\begin{description}
Fred Drake272fb3a1998-04-07 14:15:28 +0000258\item[clmodule.c]
259--- Interface to the SGI compression library.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000260
Fred Drake272fb3a1998-04-07 14:15:28 +0000261\item[svmodule.c]
262--- Interface to the ``simple video'' board on SGI Indigo
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000263(obsolete hardware).
Fred Drake3700b6f1998-08-07 16:02:28 +0000264\end{description}