Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 1 | \chapter{Undocumented Modules} |
Fred Drake | 710c035 | 1998-02-18 15:47:17 +0000 | [diff] [blame] | 2 | \label{undoc} |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 3 | |
| 4 | Here's a quick listing of modules that are currently undocumented, but |
| 5 | that should be documented. Feel free to contribute documentation for |
Fred Drake | 16e81f4 | 1999-02-24 19:57:14 +0000 | [diff] [blame] | 6 | them! (The idea and original contents for this chapter were taken |
| 7 | from a posting by Fredrik Lundh; I have revised some modules' status.) |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 8 | |
| 9 | |
Fred Drake | 16e81f4 | 1999-02-24 19:57:14 +0000 | [diff] [blame] | 10 | \section{Frameworks} |
| 11 | |
| 12 | Frameworks tend to be harder to document, but are well worth the |
| 13 | effort spent. |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 14 | |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 15 | \begin{description} |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 16 | \item[\module{Tkinter}] |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 17 | --- Interface to Tcl/Tk for graphical user interfaces; |
Fred Drake | dac9a4e | 1999-04-16 18:26:22 +0000 | [diff] [blame] | 18 | Fredrik Lundh is working on this one! See \emph{An Introduction to |
Fred Drake | 6f49e0a | 1999-06-18 19:58:59 +0000 | [diff] [blame] | 19 | Tkinter} at \url{http://www.pythonware.com/library/} for on-line |
| 20 | reference material. |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 21 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 22 | \item[\module{Tkdnd}] |
Fred Drake | 95638f5 | 1998-04-14 04:55:43 +0000 | [diff] [blame] | 23 | --- Drag-and-drop support for \module{Tkinter}. |
| 24 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 25 | \item[\module{test}] |
Fred Drake | 211f22c | 1998-08-11 18:13:31 +0000 | [diff] [blame] | 26 | --- Regression testing framework. This is used for the Python |
| 27 | regression test, but is useful for other Python libraries as well. |
| 28 | This is a package rather than a module. |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 29 | \end{description} |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 30 | |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 31 | |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 32 | \section{Miscellaneous useful utilities} |
| 33 | |
Fred Drake | ae4d5c2 | 1999-06-23 14:56:13 +0000 | [diff] [blame] | 34 | Some of these are very old and/or not very robust; marked with ``hmm.'' |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 35 | |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 36 | \begin{description} |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 37 | \item[\module{dircmp}] |
Fred Drake | ae4d5c2 | 1999-06-23 14:56:13 +0000 | [diff] [blame] | 38 | --- class to build directory diff tools on (may become a demo or tool) |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 39 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 40 | \item[\module{bdb}] |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 41 | --- A generic Python debugger base class (used by pdb) |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 42 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 43 | \item[\module{ihooks}] |
Fred Drake | ae4d5c2 | 1999-06-23 14:56:13 +0000 | [diff] [blame] | 44 | --- Import hook support (for \refmodule{rexec}; may become obsolete) |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 45 | |
| 46 | \item[\module{tzparse}] |
| 47 | --- Parse a timezone specification (unfinished; may disappear in the |
| 48 | future) |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 49 | \end{description} |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 50 | |
Guido van Rossum | 9085822 | 1997-08-15 02:52:46 +0000 | [diff] [blame] | 51 | |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 52 | \section{Platform specific modules} |
| 53 | |
Fred Drake | 6f49e0a | 1999-06-18 19:58:59 +0000 | [diff] [blame] | 54 | These modules are used to implement the \refmodule{os.path} module, |
| 55 | and are not documented beyond this mention. There's little need to |
| 56 | document these. |
Fred Drake | 560bcae | 1999-02-02 18:59:58 +0000 | [diff] [blame] | 57 | |
| 58 | \begin{description} |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 59 | \item[\module{dospath}] |
Fred Drake | 560bcae | 1999-02-02 18:59:58 +0000 | [diff] [blame] | 60 | --- implementation of \module{os.path} on MS-DOS |
| 61 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 62 | \item[\module{ntpath}] |
Fred Drake | 560bcae | 1999-02-02 18:59:58 +0000 | [diff] [blame] | 63 | --- implementation on \module{os.path} on 32-bit Windows |
| 64 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 65 | \item[\module{posixpath}] |
Fred Drake | 560bcae | 1999-02-02 18:59:58 +0000 | [diff] [blame] | 66 | --- implementation on \module{os.path} on \POSIX{} |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 67 | \end{description} |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 68 | |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 69 | |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 70 | \section{Multimedia} |
| 71 | |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 72 | \begin{description} |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 73 | \item[\module{audiodev}] |
Fred Drake | ae4d5c2 | 1999-06-23 14:56:13 +0000 | [diff] [blame] | 74 | --- Platform-independent API for playing audio data |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 75 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 76 | \item[\module{sunaudio}] |
Fred Drake | ae4d5c2 | 1999-06-23 14:56:13 +0000 | [diff] [blame] | 77 | --- interpret sun audio headers (may become obsolete or a tool/demo) |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 78 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 79 | \item[\module{toaiff}] |
Fred Drake | 6f49e0a | 1999-06-18 19:58:59 +0000 | [diff] [blame] | 80 | --- Convert "arbitrary" sound files to AIFF files; should probably |
Fred Drake | ae4d5c2 | 1999-06-23 14:56:13 +0000 | [diff] [blame] | 81 | become a tool or demo. Requires the external program \program{sox}. |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 82 | \end{description} |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 83 | |
| 84 | |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 85 | \section{Obsolete} |
| 86 | |
Fred Drake | 71c1e50 | 1998-04-04 07:03:19 +0000 | [diff] [blame] | 87 | These modules are not on the standard module search path; |
| 88 | \indexiii{module}{search}{path} |
| 89 | but are available in the directory \file{lib-old/} installed under |
Fred Drake | 3700b6f | 1998-08-07 16:02:28 +0000 | [diff] [blame] | 90 | \file{\textrm{\$prefix}/lib/python1.5/}. % $ <-- bow to font lock |
| 91 | To use any of these modules, add that directory to \code{sys.path}, |
| 92 | possibly using \envvar{PYTHONPATH}. |
Guido van Rossum | cfaf143 | 1997-07-16 15:48:20 +0000 | [diff] [blame] | 93 | |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 94 | \begin{description} |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 95 | \item[\module{addpack}] |
| 96 | --- alternate approach to packages |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 97 | |
Fred Drake | a8052a3 | 1999-10-26 16:27:28 +0000 | [diff] [blame] | 98 | \item[\module{cmp}] |
Fred Drake | 47a27b6 | 1999-10-29 17:25:59 +0000 | [diff] [blame] | 99 | --- File comparison function. Use the newer \refmodule{filecmp} instead. |
Fred Drake | a8052a3 | 1999-10-26 16:27:28 +0000 | [diff] [blame] | 100 | |
| 101 | \item[\module{cmpcache}] |
| 102 | --- Caching version of the obsolete \module{cmp} module. Use the |
Fred Drake | 47a27b6 | 1999-10-29 17:25:59 +0000 | [diff] [blame] | 103 | newer \refmodule{filecmp} instead. |
Fred Drake | a8052a3 | 1999-10-26 16:27:28 +0000 | [diff] [blame] | 104 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 105 | \item[\module{codehack}] |
Fred Drake | 9ed1a0a | 1998-11-02 15:46:21 +0000 | [diff] [blame] | 106 | --- Extract function name or line number from a function |
Fred Drake | ae4d5c2 | 1999-06-23 14:56:13 +0000 | [diff] [blame] | 107 | code object (these are now accessible as attributes: |
| 108 | \member{co.co_name}, \member{func.func_name}, |
| 109 | \member{co.co_firstlineno}). |
Fred Drake | 9ed1a0a | 1998-11-02 15:46:21 +0000 | [diff] [blame] | 110 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 111 | \item[\module{dump}] |
Fred Drake | 46e1a32 | 1999-06-18 17:12:15 +0000 | [diff] [blame] | 112 | --- Print python code that reconstructs a variable |
| 113 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 114 | \item[\module{fmt}] |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 115 | --- text formatting abstractions (too slow) |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 116 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 117 | \item[\module{lockfile}] |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 118 | --- wrapper around FCNTL file locking (use |
Fred Drake | ae4d5c2 | 1999-06-23 14:56:13 +0000 | [diff] [blame] | 119 | \function{fcntl.lockf()}/\function{flock()} intead; see \refmodule{fcntl}) |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 120 | |
Fred Drake | a8052a3 | 1999-10-26 16:27:28 +0000 | [diff] [blame] | 121 | \item[\module{newdir}] |
| 122 | --- New \function{dir()} function (the standard \function{dir()} is |
| 123 | now just as good) |
| 124 | |
| 125 | \item[\module{Para}] |
| 126 | --- helper for fmt.py |
| 127 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 128 | \item[\module{poly}] |
Fred Drake | 9ed1a0a | 1998-11-02 15:46:21 +0000 | [diff] [blame] | 129 | --- Polynomials |
| 130 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 131 | \item[\module{tb}] |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 132 | --- Print tracebacks, with a dump of local variables (use |
Fred Drake | e36e4e6 | 1999-01-13 17:11:52 +0000 | [diff] [blame] | 133 | \function{pdb.pm()} or \refmodule{traceback} instead) |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 134 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 135 | \item[\module{timing}] |
Fred Drake | 3700b6f | 1998-08-07 16:02:28 +0000 | [diff] [blame] | 136 | --- Measure time intervals to high resolution (use |
| 137 | \function{time.clock()} instead). (This is an extension module.) |
Fred Drake | 9ed1a0a | 1998-11-02 15:46:21 +0000 | [diff] [blame] | 138 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 139 | \item[\module{util}] |
Fred Drake | 4d5c87b | 1999-06-10 21:17:11 +0000 | [diff] [blame] | 140 | --- Useful functions that don't fit elsewhere. |
| 141 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 142 | \item[\module{wdb}] |
Fred Drake | 6f49e0a | 1999-06-18 19:58:59 +0000 | [diff] [blame] | 143 | --- A primitive windowing debugger based on STDWIN. |
| 144 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 145 | \item[\module{whatsound}] |
Fred Drake | e36e4e6 | 1999-01-13 17:11:52 +0000 | [diff] [blame] | 146 | --- Recognize sound files; use \refmodule{sndhdr} instead. |
Fred Drake | 60adb36 | 1999-01-05 23:09:12 +0000 | [diff] [blame] | 147 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 148 | \item[\module{zmod}] |
Fred Drake | 9ed1a0a | 1998-11-02 15:46:21 +0000 | [diff] [blame] | 149 | --- Compute properties of mathematical "fields" |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 150 | \end{description} |
Guido van Rossum | 61c2703 | 1997-07-18 21:08:07 +0000 | [diff] [blame] | 151 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 152 | |
| 153 | The following modules are obsolete, but are likely re-surface as tools |
| 154 | or scripts. |
| 155 | |
| 156 | \begin{description} |
| 157 | \item[\module{find}] |
| 158 | --- find files matching pattern in directory tree |
| 159 | |
| 160 | \item[\module{grep}] |
| 161 | --- grep |
| 162 | |
| 163 | \item[\module{packmail}] |
| 164 | --- create a self-unpacking \UNIX{} shell archive |
| 165 | \end{description} |
| 166 | |
| 167 | |
Fred Drake | 20ca917 | 1998-04-09 14:32:28 +0000 | [diff] [blame] | 168 | The following modules were documented in previous versions of this |
Fred Drake | ae4d5c2 | 1999-06-23 14:56:13 +0000 | [diff] [blame] | 169 | manual, but are now considered obsolete. The source for the |
| 170 | documentation is still available as part of the documentation source |
| 171 | archive. |
Fred Drake | 20ca917 | 1998-04-09 14:32:28 +0000 | [diff] [blame] | 172 | |
| 173 | \begin{description} |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 174 | \item[\module{ni}] |
Fred Drake | 3700b6f | 1998-08-07 16:02:28 +0000 | [diff] [blame] | 175 | --- Import modules in ``packages.'' Basic package support is now |
| 176 | built in. |
Fred Drake | 20ca917 | 1998-04-09 14:32:28 +0000 | [diff] [blame] | 177 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 178 | \item[\module{rand}] |
Fred Drake | 20ca917 | 1998-04-09 14:32:28 +0000 | [diff] [blame] | 179 | --- Old interface to the random number generator. |
| 180 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 181 | \item[\module{soundex}] |
Fred Drake | 20ca917 | 1998-04-09 14:32:28 +0000 | [diff] [blame] | 182 | --- Algorithm for collapsing names which sound similar to a shared |
| 183 | key. (This is an extension module.) |
| 184 | \end{description} |
| 185 | |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 186 | |
| 187 | \section{Extension modules} |
| 188 | |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 189 | \begin{description} |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 190 | \item[\module{stdwin}] |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 191 | --- Interface to STDWIN (an old, unsupported |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 192 | platform-independent GUI package). Obsolete; use \module{Tkinter} for |
| 193 | a platform-independent GUI instead. |
Fred Drake | 3700b6f | 1998-08-07 16:02:28 +0000 | [diff] [blame] | 194 | \end{description} |
Guido van Rossum | b9ee9c2 | 1997-06-02 17:34:02 +0000 | [diff] [blame] | 195 | |
Fred Drake | ae4d5c2 | 1999-06-23 14:56:13 +0000 | [diff] [blame] | 196 | The following are SGI specific, and may be out of touch with the |
| 197 | current version of reality. |
Guido van Rossum | 8d2893b | 1997-03-27 20:57:52 +0000 | [diff] [blame] | 198 | |
Fred Drake | 3700b6f | 1998-08-07 16:02:28 +0000 | [diff] [blame] | 199 | \begin{description} |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 200 | \item[\module{cl}] |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 201 | --- Interface to the SGI compression library. |
Guido van Rossum | 8d2893b | 1997-03-27 20:57:52 +0000 | [diff] [blame] | 202 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 203 | \item[\module{sv}] |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 204 | --- Interface to the ``simple video'' board on SGI Indigo |
Guido van Rossum | 8d2893b | 1997-03-27 20:57:52 +0000 | [diff] [blame] | 205 | (obsolete hardware). |
Fred Drake | 3700b6f | 1998-08-07 16:02:28 +0000 | [diff] [blame] | 206 | \end{description} |