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