blob: 361b9ef83a385dce82c5f129e713e2e2b1f897d4 [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
6them! (The idea and most contents for this chapter were taken from a
7posting by Fredrik Lundh; I have revised some modules' status.)
8
9
Fred Drakea007c131997-12-29 21:32:26 +000010\section{Frameworks; somewhat harder to document, but well worth the effort}
Guido van Rossum612316f1997-03-14 04:12:52 +000011
Fred Drake272fb3a1998-04-07 14:15:28 +000012\begin{description}
13\item[Tkinter.py]
14--- Interface to Tcl/Tk for graphical user interfaces;
Guido van Rossum15085381997-04-03 23:49:28 +000015Fredrik Lundh is working on this one!
Guido van Rossum612316f1997-03-14 04:12:52 +000016
Fred Drake95638f51998-04-14 04:55:43 +000017\item[Tkdnd.py]
18--- Drag-and-drop support for \module{Tkinter}.
19
Fred Drake272fb3a1998-04-07 14:15:28 +000020\item[CGIHTTPServer.py]
21--- CGI-savvy HTTP Server
Guido van Rossum612316f1997-03-14 04:12:52 +000022
Fred Drake272fb3a1998-04-07 14:15:28 +000023\item[SimpleHTTPServer.py]
24--- Simple HTTP Server
Fred Drake211f22c1998-08-11 18:13:31 +000025
26\item[test]
27--- Regression testing framework. This is used for the Python
28regression test, but is useful for other Python libraries as well.
29This is a package rather than a module.
Fred Drake272fb3a1998-04-07 14:15:28 +000030\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000031
Guido van Rossum612316f1997-03-14 04:12:52 +000032
Guido van Rossum612316f1997-03-14 04:12:52 +000033\section{Miscellaneous useful utilities}
34
35Some of these are very old and/or not very robust; marked with ``hmm''.
36
Fred Drake272fb3a1998-04-07 14:15:28 +000037\begin{description}
Fred Drake272fb3a1998-04-07 14:15:28 +000038\item[cmp.py]
39--- Efficiently compare files
Guido van Rossum612316f1997-03-14 04:12:52 +000040
Fred Drake272fb3a1998-04-07 14:15:28 +000041\item[cmpcache.py]
42--- Efficiently compare files (uses statcache)
Guido van Rossum612316f1997-03-14 04:12:52 +000043
Fred Drake272fb3a1998-04-07 14:15:28 +000044\item[dircache.py]
45--- like os.listdir, but caches results
Guido van Rossum612316f1997-03-14 04:12:52 +000046
Fred Drake272fb3a1998-04-07 14:15:28 +000047\item[dircmp.py]
48--- class to build directory diff tools on
Guido van Rossum612316f1997-03-14 04:12:52 +000049
Fred Drake272fb3a1998-04-07 14:15:28 +000050\item[linecache.py]
51--- Cache lines from files (used by pdb)
Guido van Rossum612316f1997-03-14 04:12:52 +000052
Fred Drake272fb3a1998-04-07 14:15:28 +000053\item[pipes.py]
54--- Conversion pipeline templates (hmm)
Guido van Rossum612316f1997-03-14 04:12:52 +000055
Fred Drake272fb3a1998-04-07 14:15:28 +000056\item[statcache.py]
57--- Maintain a cache of file stats
Guido van Rossum612316f1997-03-14 04:12:52 +000058
Fred Drake272fb3a1998-04-07 14:15:28 +000059\item[colorsys.py]
60--- Conversion between RGB and other color systems
Guido van Rossum612316f1997-03-14 04:12:52 +000061
Fred Drake272fb3a1998-04-07 14:15:28 +000062\item[dbhash.py]
63--- (g)dbm-like wrapper for bsdhash.hashopen
Guido van Rossum15085381997-04-03 23:49:28 +000064
Fred Drake272fb3a1998-04-07 14:15:28 +000065\item[mhlib.py]
66--- MH interface
Guido van Rossum612316f1997-03-14 04:12:52 +000067
Fred Drake272fb3a1998-04-07 14:15:28 +000068\item[pty.py]
69--- Pseudo terminal utilities
Guido van Rossum612316f1997-03-14 04:12:52 +000070
Fred Drake272fb3a1998-04-07 14:15:28 +000071\item[tty.py]
72--- Terminal utilities
Guido van Rossum612316f1997-03-14 04:12:52 +000073
Fred Drake272fb3a1998-04-07 14:15:28 +000074\item[bdb.py]
75--- A generic Python debugger base class (used by pdb)
Guido van Rossum612316f1997-03-14 04:12:52 +000076
Fred Drake6b9ff721998-04-07 19:09:32 +000077\item[wdb.py]
78--- A primitive windowing debugger based on STDWIN.
79
Fred Drake272fb3a1998-04-07 14:15:28 +000080\item[ihooks.py]
81--- Import hook support (for rexec)
Fred Drake272fb3a1998-04-07 14:15:28 +000082\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +000083
Guido van Rossum90858221997-08-15 02:52:46 +000084
Guido van Rossum612316f1997-03-14 04:12:52 +000085\section{Platform specific modules}
86
Guido van Rossum612316f1997-03-14 04:12:52 +000087
Fred Drake560bcae1999-02-02 18:59:58 +000088These modules are used to implement the \refmodule{os.path} module, and
89are not documented beyond this mention.
90
91\begin{description}
Fred Drake272fb3a1998-04-07 14:15:28 +000092\item[dospath.py]
Fred Drake560bcae1999-02-02 18:59:58 +000093--- implementation of \module{os.path} on MS-DOS
94
95\item[ntpath.py]
96--- implementation on \module{os.path} on 32-bit Windows
97
98\item[posixpath.py]
99--- implementation on \module{os.path} on \POSIX{}
Fred Drake272fb3a1998-04-07 14:15:28 +0000100\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +0000101
Guido van Rossum612316f1997-03-14 04:12:52 +0000102
Guido van Rossum612316f1997-03-14 04:12:52 +0000103\section{Multimedia}
104
Fred Drake272fb3a1998-04-07 14:15:28 +0000105\begin{description}
106\item[audiodev.py]
107--- Plays audio files
Guido van Rossum612316f1997-03-14 04:12:52 +0000108
Fred Drake272fb3a1998-04-07 14:15:28 +0000109\item[sunau.py]
110--- parse Sun and NeXT audio files
Guido van Rossum612316f1997-03-14 04:12:52 +0000111
Fred Drake272fb3a1998-04-07 14:15:28 +0000112\item[sunaudio.py]
113--- interpret sun audio headers
Guido van Rossum612316f1997-03-14 04:12:52 +0000114
Fred Drake272fb3a1998-04-07 14:15:28 +0000115\item[toaiff.py]
116--- Convert "arbitrary" sound files to AIFF files
Guido van Rossum612316f1997-03-14 04:12:52 +0000117
Fred Drake272fb3a1998-04-07 14:15:28 +0000118\item[wave.py]
119--- parse WAVE files
Fred Drake272fb3a1998-04-07 14:15:28 +0000120\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +0000121
122
123\section{Oddities}
124
125These modules are probably also obsolete, or just not very useful.
126
Fred Drake272fb3a1998-04-07 14:15:28 +0000127\begin{description}
128\item[dump.py]
129--- Print python code that reconstructs a variable
Guido van Rossum612316f1997-03-14 04:12:52 +0000130
Fred Drake272fb3a1998-04-07 14:15:28 +0000131\item[find.py]
132--- find files matching pattern in directory tree
Guido van Rossum612316f1997-03-14 04:12:52 +0000133
Fred Drake272fb3a1998-04-07 14:15:28 +0000134\item[fpformat.py]
135--- General floating point formatting functions ---
Fred Drake71c1e501998-04-04 07:03:19 +0000136interesting demonstration of how to do this without using the \C{}
137library
Guido van Rossum612316f1997-03-14 04:12:52 +0000138
Fred Drake272fb3a1998-04-07 14:15:28 +0000139\item[grep.py]
140--- grep
Guido van Rossum612316f1997-03-14 04:12:52 +0000141
Fred Drake272fb3a1998-04-07 14:15:28 +0000142\item[mutex.py]
143--- Mutual exclusion --- for use with module sched
Guido van Rossum612316f1997-03-14 04:12:52 +0000144
Fred Drake272fb3a1998-04-07 14:15:28 +0000145\item[packmail.py]
146--- create a self-unpacking \UNIX{} shell archive
Guido van Rossum612316f1997-03-14 04:12:52 +0000147
Fred Drake272fb3a1998-04-07 14:15:28 +0000148\item[sched.py]
149--- event scheduler class
Guido van Rossum612316f1997-03-14 04:12:52 +0000150
Fred Drake272fb3a1998-04-07 14:15:28 +0000151\item[util.py]
152--- useful functions that don't fit elsewhere
Guido van Rossum612316f1997-03-14 04:12:52 +0000153
Fred Drake272fb3a1998-04-07 14:15:28 +0000154\item[tzparse.py]
155--- Parse a timezone specification (unfinished)
156\end{description}
Guido van Rossum612316f1997-03-14 04:12:52 +0000157
158
159\section{Obsolete}
160
Fred Drake71c1e501998-04-04 07:03:19 +0000161These modules are not on the standard module search path;
162\indexiii{module}{search}{path}
163but are available in the directory \file{lib-old/} installed under
Fred Drake3700b6f1998-08-07 16:02:28 +0000164\file{\textrm{\$prefix}/lib/python1.5/}. % $ <-- bow to font lock
165To use any of these modules, add that directory to \code{sys.path},
166possibly using \envvar{PYTHONPATH}.
Guido van Rossumcfaf1431997-07-16 15:48:20 +0000167
Fred Drake272fb3a1998-04-07 14:15:28 +0000168\begin{description}
169\item[newdir.py]
170--- New dir() function (the standard dir() is now just as good)
Guido van Rossum612316f1997-03-14 04:12:52 +0000171
Fred Drake272fb3a1998-04-07 14:15:28 +0000172\item[addpack.py]
173--- standard support for "packages"
Guido van Rossum612316f1997-03-14 04:12:52 +0000174
Fred Drake9ed1a0af1998-11-02 15:46:21 +0000175\item[codehack.py]
176--- Extract function name or line number from a function
177code object (these are now accessible as attributes: co.co_name,
178func.func_name, co.co_firstlineno).
179
Fred Drake272fb3a1998-04-07 14:15:28 +0000180\item[fmt.py]
181--- text formatting abstractions (too slow)
Guido van Rossum612316f1997-03-14 04:12:52 +0000182
Fred Drake272fb3a1998-04-07 14:15:28 +0000183\item[Para.py]
184--- helper for fmt.py
Fred Drake71c1e501998-04-04 07:03:19 +0000185
Fred Drake272fb3a1998-04-07 14:15:28 +0000186\item[lockfile.py]
187--- wrapper around FCNTL file locking (use
Fred Drake3700b6f1998-08-07 16:02:28 +0000188\function{fcntl.lockf()}/\function{flock()} intead)
Guido van Rossum612316f1997-03-14 04:12:52 +0000189
Fred Drake9ed1a0af1998-11-02 15:46:21 +0000190\item[poly.py]
191--- Polynomials
192
Fred Drake272fb3a1998-04-07 14:15:28 +0000193\item[tb.py]
194--- Print tracebacks, with a dump of local variables (use
Fred Drakee36e4e61999-01-13 17:11:52 +0000195\function{pdb.pm()} or \refmodule{traceback} instead)
Guido van Rossum612316f1997-03-14 04:12:52 +0000196
Fred Drake3700b6f1998-08-07 16:02:28 +0000197\item[timingmodule]
198--- Measure time intervals to high resolution (use
199\function{time.clock()} instead). (This is an extension module.)
Fred Drake9ed1a0af1998-11-02 15:46:21 +0000200
Fred Drake60adb361999-01-05 23:09:12 +0000201\item[whatsound.py]
Fred Drakee36e4e61999-01-13 17:11:52 +0000202--- Recognize sound files; use \refmodule{sndhdr} instead.
Fred Drake60adb361999-01-05 23:09:12 +0000203
Fred Drake9ed1a0af1998-11-02 15:46:21 +0000204\item[zmod.py]
205--- Compute properties of mathematical "fields"
Fred Drake272fb3a1998-04-07 14:15:28 +0000206\end{description}
Guido van Rossum61c27031997-07-18 21:08:07 +0000207
Fred Drake20ca9171998-04-09 14:32:28 +0000208The following modules were documented in previous versions of this
209manual, but are now considered obsolete:
210
211\begin{description}
212\item[ni]
Fred Drake3700b6f1998-08-07 16:02:28 +0000213--- Import modules in ``packages.'' Basic package support is now
214built in.
Fred Drake20ca9171998-04-09 14:32:28 +0000215
216\item[rand]
217--- Old interface to the random number generator.
218
219\item[soundex]
220--- Algorithm for collapsing names which sound similar to a shared
221key. (This is an extension module.)
222\end{description}
223
Guido van Rossum612316f1997-03-14 04:12:52 +0000224
225\section{Extension modules}
226
Fred Drake272fb3a1998-04-07 14:15:28 +0000227\begin{description}
228\item[bsddbmodule.c]
229--- Interface to the Berkeley DB interface (yet another
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000230dbm clone).
231
Fred Drake272fb3a1998-04-07 14:15:28 +0000232\item[cursesmodule.c]
233--- Curses interface.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000234
Fred Drake272fb3a1998-04-07 14:15:28 +0000235\item[dlmodule.c]
236--- A highly experimental and dangerous device for calling
Fred Drake3700b6f1998-08-07 16:02:28 +0000237arbitrary \C{} functions in arbitrary shared libraries.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000238
Fred Drake272fb3a1998-04-07 14:15:28 +0000239\item[newmodule.c]
Fred Drake3700b6f1998-08-07 16:02:28 +0000240--- Tommy Burnette's \module{new} module (creates new empty objects of
Fred Drake272fb3a1998-04-07 14:15:28 +0000241certain kinds) --- dangerous.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000242
Fred Drake272fb3a1998-04-07 14:15:28 +0000243\item[nismodule.c]
244--- NIS (a.k.a. Sun's Yellow Pages) interface.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000245
Fred Drake272fb3a1998-04-07 14:15:28 +0000246\item[stdwinmodule.c]
247--- Interface to STDWIN (an old, unsupported
Guido van Rossumb9ee9c21997-06-02 17:34:02 +0000248platform-independent GUI package). Obsolete; use Tkinter for a
249platform-independent GUI instead.
Fred Drake3700b6f1998-08-07 16:02:28 +0000250\end{description}
Guido van Rossumb9ee9c21997-06-02 17:34:02 +0000251
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000252The following are SGI specific:
253
Fred Drake3700b6f1998-08-07 16:02:28 +0000254\begin{description}
Fred Drake272fb3a1998-04-07 14:15:28 +0000255\item[clmodule.c]
256--- Interface to the SGI compression library.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000257
Fred Drake272fb3a1998-04-07 14:15:28 +0000258\item[svmodule.c]
259--- Interface to the ``simple video'' board on SGI Indigo
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000260(obsolete hardware).
Fred Drake3700b6f1998-08-07 16:02:28 +0000261\end{description}