blob: 0c4fdf810d698212d62f142135333d41cddf8f31 [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[pty.py]
66--- Pseudo terminal utilities
Guido van Rossum612316f1997-03-14 04:12:52 +000067
Fred Drake272fb3a1998-04-07 14:15:28 +000068\item[tty.py]
69--- Terminal utilities
Guido van Rossum612316f1997-03-14 04:12:52 +000070
Fred Drake272fb3a1998-04-07 14:15:28 +000071\item[bdb.py]
72--- A generic Python debugger base class (used by pdb)
Guido van Rossum612316f1997-03-14 04:12:52 +000073
Fred Drake6b9ff721998-04-07 19:09:32 +000074\item[wdb.py]
75--- A primitive windowing debugger based on STDWIN.
76
Fred Drake272fb3a1998-04-07 14:15:28 +000077\item[ihooks.py]
78--- Import hook support (for rexec)
Fred Drake272fb3a1998-04-07 14:15:28 +000079\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000080
Guido van Rossum90858221997-08-15 02:52:46 +000081
Guido van Rossum612316f1997-03-14 04:12:52 +000082\section{Platform specific modules}
83
Guido van Rossum612316f1997-03-14 04:12:52 +000084
Fred Drake560bcae1999-02-02 18:59:58 +000085These modules are used to implement the \refmodule{os.path} module, and
86are not documented beyond this mention.
87
88\begin{description}
Fred Drake272fb3a1998-04-07 14:15:28 +000089\item[dospath.py]
Fred Drake560bcae1999-02-02 18:59:58 +000090--- implementation of \module{os.path} on MS-DOS
91
92\item[ntpath.py]
93--- implementation on \module{os.path} on 32-bit Windows
94
95\item[posixpath.py]
96--- implementation on \module{os.path} on \POSIX{}
Fred Drake272fb3a1998-04-07 14:15:28 +000097\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000098
Guido van Rossum612316f1997-03-14 04:12:52 +000099
Guido van Rossum612316f1997-03-14 04:12:52 +0000100\section{Multimedia}
101
Fred Drake272fb3a1998-04-07 14:15:28 +0000102\begin{description}
103\item[audiodev.py]
104--- Plays audio files
Guido van Rossum612316f1997-03-14 04:12:52 +0000105
Fred Drake272fb3a1998-04-07 14:15:28 +0000106\item[sunau.py]
107--- parse Sun and NeXT audio files
Guido van Rossum612316f1997-03-14 04:12:52 +0000108
Fred Drake272fb3a1998-04-07 14:15:28 +0000109\item[sunaudio.py]
110--- interpret sun audio headers
Guido van Rossum612316f1997-03-14 04:12:52 +0000111
Fred Drake272fb3a1998-04-07 14:15:28 +0000112\item[toaiff.py]
113--- Convert "arbitrary" sound files to AIFF files
Guido van Rossum612316f1997-03-14 04:12:52 +0000114
Fred Drake272fb3a1998-04-07 14:15:28 +0000115\item[wave.py]
116--- parse WAVE files
Fred Drake272fb3a1998-04-07 14:15:28 +0000117\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +0000118
119
120\section{Oddities}
121
122These modules are probably also obsolete, or just not very useful.
123
Fred Drake272fb3a1998-04-07 14:15:28 +0000124\begin{description}
125\item[dump.py]
126--- Print python code that reconstructs a variable
Guido van Rossum612316f1997-03-14 04:12:52 +0000127
Fred Drake272fb3a1998-04-07 14:15:28 +0000128\item[find.py]
129--- find files matching pattern in directory tree
Guido van Rossum612316f1997-03-14 04:12:52 +0000130
Fred Drake272fb3a1998-04-07 14:15:28 +0000131\item[fpformat.py]
132--- General floating point formatting functions ---
Fred Drake71c1e501998-04-04 07:03:19 +0000133interesting demonstration of how to do this without using the \C{}
134library
Guido van Rossum612316f1997-03-14 04:12:52 +0000135
Fred Drake272fb3a1998-04-07 14:15:28 +0000136\item[grep.py]
137--- grep
Guido van Rossum612316f1997-03-14 04:12:52 +0000138
Fred Drake272fb3a1998-04-07 14:15:28 +0000139\item[mutex.py]
140--- Mutual exclusion --- for use with module sched
Guido van Rossum612316f1997-03-14 04:12:52 +0000141
Fred Drake272fb3a1998-04-07 14:15:28 +0000142\item[packmail.py]
143--- create a self-unpacking \UNIX{} shell archive
Guido van Rossum612316f1997-03-14 04:12:52 +0000144
Fred Drake272fb3a1998-04-07 14:15:28 +0000145\item[sched.py]
146--- event scheduler class
Guido van Rossum612316f1997-03-14 04:12:52 +0000147
Fred Drake272fb3a1998-04-07 14:15:28 +0000148\item[tzparse.py]
149--- Parse a timezone specification (unfinished)
150\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +0000151
152
153\section{Obsolete}
154
Fred Drake71c1e501998-04-04 07:03:19 +0000155These modules are not on the standard module search path;
156\indexiii{module}{search}{path}
157but are available in the directory \file{lib-old/} installed under
Fred Drake3700b6f1998-08-07 16:02:28 +0000158\file{\textrm{\$prefix}/lib/python1.5/}. % $ <-- bow to font lock
159To use any of these modules, add that directory to \code{sys.path},
160possibly using \envvar{PYTHONPATH}.
Guido van Rossumcfaf1431997-07-16 15:48:20 +0000161
Fred Drake272fb3a1998-04-07 14:15:28 +0000162\begin{description}
163\item[newdir.py]
164--- New dir() function (the standard dir() is now just as good)
Guido van Rossum612316f1997-03-14 04:12:52 +0000165
Fred Drake272fb3a1998-04-07 14:15:28 +0000166\item[addpack.py]
167--- standard support for "packages"
Guido van Rossum612316f1997-03-14 04:12:52 +0000168
Fred Drake9ed1a0af1998-11-02 15:46:21 +0000169\item[codehack.py]
170--- Extract function name or line number from a function
171code object (these are now accessible as attributes: co.co_name,
172func.func_name, co.co_firstlineno).
173
Fred Drake272fb3a1998-04-07 14:15:28 +0000174\item[fmt.py]
175--- text formatting abstractions (too slow)
Guido van Rossum612316f1997-03-14 04:12:52 +0000176
Fred Drake272fb3a1998-04-07 14:15:28 +0000177\item[Para.py]
178--- helper for fmt.py
Fred Drake71c1e501998-04-04 07:03:19 +0000179
Fred Drake272fb3a1998-04-07 14:15:28 +0000180\item[lockfile.py]
181--- wrapper around FCNTL file locking (use
Fred Drake3700b6f1998-08-07 16:02:28 +0000182\function{fcntl.lockf()}/\function{flock()} intead)
Guido van Rossum612316f1997-03-14 04:12:52 +0000183
Fred Drake9ed1a0af1998-11-02 15:46:21 +0000184\item[poly.py]
185--- Polynomials
186
Fred Drake272fb3a1998-04-07 14:15:28 +0000187\item[tb.py]
188--- Print tracebacks, with a dump of local variables (use
Fred Drakee36e4e61999-01-13 17:11:52 +0000189\function{pdb.pm()} or \refmodule{traceback} instead)
Guido van Rossum612316f1997-03-14 04:12:52 +0000190
Fred Drake3700b6f1998-08-07 16:02:28 +0000191\item[timingmodule]
192--- Measure time intervals to high resolution (use
193\function{time.clock()} instead). (This is an extension module.)
Fred Drake9ed1a0af1998-11-02 15:46:21 +0000194
Fred Drake4d5c87b1999-06-10 21:17:11 +0000195\item[util.py]
196--- Useful functions that don't fit elsewhere.
197
Fred Drake60adb361999-01-05 23:09:12 +0000198\item[whatsound.py]
Fred Drakee36e4e61999-01-13 17:11:52 +0000199--- Recognize sound files; use \refmodule{sndhdr} instead.
Fred Drake60adb361999-01-05 23:09:12 +0000200
Fred Drake9ed1a0af1998-11-02 15:46:21 +0000201\item[zmod.py]
202--- Compute properties of mathematical "fields"
Fred Drake272fb3a1998-04-07 14:15:28 +0000203\end{description}
Guido van Rossum61c27031997-07-18 21:08:07 +0000204
Fred Drake20ca9171998-04-09 14:32:28 +0000205The following modules were documented in previous versions of this
206manual, but are now considered obsolete:
207
208\begin{description}
209\item[ni]
Fred Drake3700b6f1998-08-07 16:02:28 +0000210--- Import modules in ``packages.'' Basic package support is now
211built in.
Fred Drake20ca9171998-04-09 14:32:28 +0000212
213\item[rand]
214--- Old interface to the random number generator.
215
216\item[soundex]
217--- Algorithm for collapsing names which sound similar to a shared
218key. (This is an extension module.)
219\end{description}
220
Guido van Rossum612316f1997-03-14 04:12:52 +0000221
222\section{Extension modules}
223
Fred Drake272fb3a1998-04-07 14:15:28 +0000224\begin{description}
Fred Drake272fb3a1998-04-07 14:15:28 +0000225\item[cursesmodule.c]
226--- Curses interface.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000227
Fred Drake272fb3a1998-04-07 14:15:28 +0000228\item[dlmodule.c]
229--- A highly experimental and dangerous device for calling
Fred Drake3700b6f1998-08-07 16:02:28 +0000230arbitrary \C{} functions in arbitrary shared libraries.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000231
Fred Drake272fb3a1998-04-07 14:15:28 +0000232\item[newmodule.c]
Fred Drake3700b6f1998-08-07 16:02:28 +0000233--- Tommy Burnette's \module{new} module (creates new empty objects of
Fred Drake272fb3a1998-04-07 14:15:28 +0000234certain kinds) --- dangerous.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000235
Fred Drake272fb3a1998-04-07 14:15:28 +0000236\item[nismodule.c]
237--- NIS (a.k.a. Sun's Yellow Pages) interface.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000238
Fred Drake272fb3a1998-04-07 14:15:28 +0000239\item[stdwinmodule.c]
240--- Interface to STDWIN (an old, unsupported
Guido van Rossumb9ee9c21997-06-02 17:34:02 +0000241platform-independent GUI package). Obsolete; use Tkinter for a
242platform-independent GUI instead.
Fred Drake3700b6f1998-08-07 16:02:28 +0000243\end{description}
Guido van Rossumb9ee9c21997-06-02 17:34:02 +0000244
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000245The following are SGI specific:
246
Fred Drake3700b6f1998-08-07 16:02:28 +0000247\begin{description}
Fred Drake272fb3a1998-04-07 14:15:28 +0000248\item[clmodule.c]
249--- Interface to the SGI compression library.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000250
Fred Drake272fb3a1998-04-07 14:15:28 +0000251\item[svmodule.c]
252--- Interface to the ``simple video'' board on SGI Indigo
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000253(obsolete hardware).
Fred Drake3700b6f1998-08-07 16:02:28 +0000254\end{description}