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