Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 1 | \chapter{Undocumented Modules \label{undoc}} |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 2 | |
| 3 | Here's a quick listing of modules that are currently undocumented, but |
| 4 | that should be documented. Feel free to contribute documentation for |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 5 | them! (Send via email to \email{python-docs@python.org}.) |
| 6 | |
| 7 | The idea and original contents for this chapter were taken |
| 8 | from a posting by Fredrik Lundh; the specific contents of this chapter |
| 9 | have been substantially revised. |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 10 | |
| 11 | |
Fred Drake | 16e81f4 | 1999-02-24 19:57:14 +0000 | [diff] [blame] | 12 | \section{Frameworks} |
| 13 | |
| 14 | Frameworks tend to be harder to document, but are well worth the |
| 15 | effort spent. |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 16 | |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 17 | \begin{description} |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 18 | \item[\module{test}] |
Fred Drake | 211f22c | 1998-08-11 18:13:31 +0000 | [diff] [blame] | 19 | --- Regression testing framework. This is used for the Python |
| 20 | regression test, but is useful for other Python libraries as well. |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 21 | This is a package rather than a single module. |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 22 | \end{description} |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 23 | |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 24 | |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 25 | \section{Miscellaneous useful utilities} |
| 26 | |
Fred Drake | ae4d5c2 | 1999-06-23 14:56:13 +0000 | [diff] [blame] | 27 | 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] | 28 | |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 29 | \begin{description} |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 30 | \item[\module{bdb}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 31 | --- A generic Python debugger base class (used by pdb). |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 32 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 33 | \item[\module{ihooks}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 34 | --- Import hook support (for \refmodule{rexec}; may become obsolete). |
Fred Drake | bf781a9 | 2001-08-14 11:38:35 +0000 | [diff] [blame] | 35 | |
| 36 | \item[\module{smtpd}] |
| 37 | --- An SMTP daemon implementation which meets the minimum requirements |
| 38 | for \rfc{821} conformance. |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 39 | \end{description} |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 40 | |
Guido van Rossum | 9085822 | 1997-08-15 02:52:46 +0000 | [diff] [blame] | 41 | |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 42 | \section{Platform specific modules} |
| 43 | |
Fred Drake | 6f49e0a | 1999-06-18 19:58:59 +0000 | [diff] [blame] | 44 | These modules are used to implement the \refmodule{os.path} module, |
| 45 | and are not documented beyond this mention. There's little need to |
| 46 | document these. |
Fred Drake | 560bcae | 1999-02-02 18:59:58 +0000 | [diff] [blame] | 47 | |
| 48 | \begin{description} |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 49 | \item[\module{ntpath}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 50 | --- Implementation on \module{os.path} on Win32, Win64, WinCE, and |
| 51 | OS/2 platforms. |
Fred Drake | 560bcae | 1999-02-02 18:59:58 +0000 | [diff] [blame] | 52 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 53 | \item[\module{posixpath}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 54 | --- Implementation on \module{os.path} on \POSIX. |
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 | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 57 | |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 58 | \section{Multimedia} |
| 59 | |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 60 | \begin{description} |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 61 | \item[\module{audiodev}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 62 | --- Platform-independent API for playing audio data. |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 63 | |
Fred Drake | 326c72a | 2003-01-08 07:21:53 +0000 | [diff] [blame^] | 64 | \item[\module{linuxaudiodev}] |
| 65 | --- Play audio data on the Linux audio device. Replaced in Python 2.3 |
| 66 | by the \module{ossaudiodev} module. |
| 67 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 68 | \item[\module{sunaudio}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 69 | --- Interpret Sun audio headers (may become obsolete or a tool/demo). |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 70 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 71 | \item[\module{toaiff}] |
Fred Drake | 6f49e0a | 1999-06-18 19:58:59 +0000 | [diff] [blame] | 72 | --- Convert "arbitrary" sound files to AIFF files; should probably |
Fred Drake | ae4d5c2 | 1999-06-23 14:56:13 +0000 | [diff] [blame] | 73 | become a tool or demo. Requires the external program \program{sox}. |
Fred Drake | 326c72a | 2003-01-08 07:21:53 +0000 | [diff] [blame^] | 74 | |
| 75 | \item[\module{ossaudiodev}] |
| 76 | --- Play audio data via the Open Sound System API. This is usable on |
| 77 | Linux, some flavors of BSD, and some commercial \UNIX{} platforms. |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 78 | \end{description} |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 79 | |
| 80 | |
Fred Drake | 38e5d27 | 2000-04-03 20:13:55 +0000 | [diff] [blame] | 81 | \section{Obsolete \label{obsolete-modules}} |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 82 | |
Fred Drake | 38e5d27 | 2000-04-03 20:13:55 +0000 | [diff] [blame] | 83 | These modules are not normally available for import; additional work |
| 84 | must be done to make them available. |
| 85 | |
| 86 | Those which are written in Python will be installed into the directory |
| 87 | \file{lib-old/} installed as part of the standard library. To use |
| 88 | these, the directory must be added to \code{sys.path}, possibly using |
| 89 | \envvar{PYTHONPATH}. |
| 90 | |
| 91 | Obsolete extension modules written in C are not built by default. |
| 92 | Under \UNIX, these must be enabled by uncommenting the appropriate |
| 93 | lines in \file{Modules/Setup} in the build tree and either rebuilding |
| 94 | Python if the modules are statically linked, or building and |
| 95 | installing the shared object if using dynamically-loaded extensions. |
| 96 | |
| 97 | % XXX need Windows instructions! |
Guido van Rossum | cfaf143 | 1997-07-16 15:48:20 +0000 | [diff] [blame] | 98 | |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 99 | \begin{description} |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 100 | \item[\module{addpack}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 101 | --- Alternate approach to packages. Use the built-in package support |
| 102 | instead. |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 103 | |
Fred Drake | a8052a3 | 1999-10-26 16:27:28 +0000 | [diff] [blame] | 104 | \item[\module{cmp}] |
Fred Drake | 47a27b6 | 1999-10-29 17:25:59 +0000 | [diff] [blame] | 105 | --- File comparison function. Use the newer \refmodule{filecmp} instead. |
Fred Drake | a8052a3 | 1999-10-26 16:27:28 +0000 | [diff] [blame] | 106 | |
| 107 | \item[\module{cmpcache}] |
| 108 | --- Caching version of the obsolete \module{cmp} module. Use the |
Fred Drake | 47a27b6 | 1999-10-29 17:25:59 +0000 | [diff] [blame] | 109 | newer \refmodule{filecmp} instead. |
Fred Drake | a8052a3 | 1999-10-26 16:27:28 +0000 | [diff] [blame] | 110 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 111 | \item[\module{codehack}] |
Fred Drake | 9ed1a0a | 1998-11-02 15:46:21 +0000 | [diff] [blame] | 112 | --- Extract function name or line number from a function |
Fred Drake | ae4d5c2 | 1999-06-23 14:56:13 +0000 | [diff] [blame] | 113 | code object (these are now accessible as attributes: |
| 114 | \member{co.co_name}, \member{func.func_name}, |
| 115 | \member{co.co_firstlineno}). |
Fred Drake | 9ed1a0a | 1998-11-02 15:46:21 +0000 | [diff] [blame] | 116 | |
Fred Drake | 2bb43a2 | 2000-02-03 15:27:26 +0000 | [diff] [blame] | 117 | \item[\module{dircmp}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 118 | --- Class to build directory diff tools on (may become a demo or tool). |
| 119 | \deprecated{2.0}{The \refmodule{filecmp} module replaces |
| 120 | \module{dircmp}.} |
Fred Drake | 2bb43a2 | 2000-02-03 15:27:26 +0000 | [diff] [blame] | 121 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 122 | \item[\module{dump}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 123 | --- Print python code that reconstructs a variable. |
Fred Drake | 46e1a32 | 1999-06-18 17:12:15 +0000 | [diff] [blame] | 124 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 125 | \item[\module{fmt}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 126 | --- Text formatting abstractions (too slow). |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 127 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 128 | \item[\module{lockfile}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 129 | --- Wrapper around FCNTL file locking (use |
| 130 | \function{fcntl.lockf()}/\function{flock()} instead; see \refmodule{fcntl}). |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 131 | |
Fred Drake | a8052a3 | 1999-10-26 16:27:28 +0000 | [diff] [blame] | 132 | \item[\module{newdir}] |
| 133 | --- New \function{dir()} function (the standard \function{dir()} is |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 134 | now just as good). |
Fred Drake | a8052a3 | 1999-10-26 16:27:28 +0000 | [diff] [blame] | 135 | |
| 136 | \item[\module{Para}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 137 | --- Helper for \module{fmt}. |
Fred Drake | a8052a3 | 1999-10-26 16:27:28 +0000 | [diff] [blame] | 138 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 139 | \item[\module{poly}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 140 | --- Polynomials. |
Fred Drake | 9ed1a0a | 1998-11-02 15:46:21 +0000 | [diff] [blame] | 141 | |
Fred Drake | 44774c9 | 2000-09-28 05:31:39 +0000 | [diff] [blame] | 142 | \item[\module{regex}] |
| 143 | --- Emacs-style regular expression support; may still be used in some |
| 144 | old code (extension module). Refer to the |
| 145 | \citetitle[http://www.python.org/doc/1.6/lib/module-regex.html]{Python |
| 146 | 1.6 Documentation} for documentation. |
| 147 | |
| 148 | \item[\module{regsub}] |
| 149 | --- Regular expression based string replacement utilities, for use |
| 150 | with \module{regex} (extension module). Refer to the |
| 151 | \citetitle[http://www.python.org/doc/1.6/lib/module-regsub.html]{Python |
| 152 | 1.6 Documentation} for documentation. |
| 153 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 154 | \item[\module{tb}] |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 155 | --- Print tracebacks, with a dump of local variables (use |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 156 | \function{pdb.pm()} or \refmodule{traceback} instead). |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 157 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 158 | \item[\module{timing}] |
Fred Drake | 3700b6f | 1998-08-07 16:02:28 +0000 | [diff] [blame] | 159 | --- Measure time intervals to high resolution (use |
| 160 | \function{time.clock()} instead). (This is an extension module.) |
Fred Drake | 9ed1a0a | 1998-11-02 15:46:21 +0000 | [diff] [blame] | 161 | |
Fred Drake | 4e6d09e | 2001-03-20 23:13:53 +0000 | [diff] [blame] | 162 | \item[\module{tzparse}] |
| 163 | --- Parse a timezone specification (unfinished; may disappear in the |
| 164 | future, and does not work when the \envvar{TZ} environment variable is |
| 165 | not set). |
| 166 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 167 | \item[\module{util}] |
Fred Drake | 4d5c87b | 1999-06-10 21:17:11 +0000 | [diff] [blame] | 168 | --- Useful functions that don't fit elsewhere. |
| 169 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 170 | \item[\module{whatsound}] |
Fred Drake | e36e4e6 | 1999-01-13 17:11:52 +0000 | [diff] [blame] | 171 | --- Recognize sound files; use \refmodule{sndhdr} instead. |
Fred Drake | 60adb36 | 1999-01-05 23:09:12 +0000 | [diff] [blame] | 172 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 173 | \item[\module{zmod}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 174 | --- Compute properties of mathematical ``fields.'' |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 175 | \end{description} |
Guido van Rossum | 61c2703 | 1997-07-18 21:08:07 +0000 | [diff] [blame] | 176 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 177 | |
Fred Drake | fffe5db | 2000-09-21 05:25:30 +0000 | [diff] [blame] | 178 | The following modules are obsolete, but are likely to re-surface as |
| 179 | tools or scripts: |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 180 | |
| 181 | \begin{description} |
| 182 | \item[\module{find}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 183 | --- Find files matching pattern in directory tree. |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 184 | |
| 185 | \item[\module{grep}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 186 | --- \program{grep} implementation in Python. |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 187 | |
| 188 | \item[\module{packmail}] |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 189 | --- Create a self-unpacking \UNIX{} shell archive. |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 190 | \end{description} |
| 191 | |
| 192 | |
Fred Drake | 20ca917 | 1998-04-09 14:32:28 +0000 | [diff] [blame] | 193 | The following modules were documented in previous versions of this |
Fred Drake | ae4d5c2 | 1999-06-23 14:56:13 +0000 | [diff] [blame] | 194 | manual, but are now considered obsolete. The source for the |
| 195 | documentation is still available as part of the documentation source |
| 196 | archive. |
Fred Drake | 20ca917 | 1998-04-09 14:32:28 +0000 | [diff] [blame] | 197 | |
| 198 | \begin{description} |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 199 | \item[\module{ni}] |
Fred Drake | 3700b6f | 1998-08-07 16:02:28 +0000 | [diff] [blame] | 200 | --- Import modules in ``packages.'' Basic package support is now |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 201 | built in. The built-in support is very similar to what is provided in |
| 202 | this module. |
Fred Drake | 20ca917 | 1998-04-09 14:32:28 +0000 | [diff] [blame] | 203 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 204 | \item[\module{rand}] |
Fred Drake | 20ca917 | 1998-04-09 14:32:28 +0000 | [diff] [blame] | 205 | --- Old interface to the random number generator. |
| 206 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 207 | \item[\module{soundex}] |
Fred Drake | 20ca917 | 1998-04-09 14:32:28 +0000 | [diff] [blame] | 208 | --- Algorithm for collapsing names which sound similar to a shared |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 209 | key. The specific algorithm doesn't seem to match any published |
| 210 | algorithm. (This is an extension module.) |
Fred Drake | 20ca917 | 1998-04-09 14:32:28 +0000 | [diff] [blame] | 211 | \end{description} |
| 212 | |
Guido van Rossum | 612316f | 1997-03-14 04:12:52 +0000 | [diff] [blame] | 213 | |
Fred Drake | 88fa962 | 2000-09-11 05:23:25 +0000 | [diff] [blame] | 214 | \section{SGI-specific Extension modules} |
Guido van Rossum | b9ee9c2 | 1997-06-02 17:34:02 +0000 | [diff] [blame] | 215 | |
Fred Drake | ae4d5c2 | 1999-06-23 14:56:13 +0000 | [diff] [blame] | 216 | The following are SGI specific, and may be out of touch with the |
| 217 | current version of reality. |
Guido van Rossum | 8d2893b | 1997-03-27 20:57:52 +0000 | [diff] [blame] | 218 | |
Fred Drake | 3700b6f | 1998-08-07 16:02:28 +0000 | [diff] [blame] | 219 | \begin{description} |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 220 | \item[\module{cl}] |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 221 | --- Interface to the SGI compression library. |
Guido van Rossum | 8d2893b | 1997-03-27 20:57:52 +0000 | [diff] [blame] | 222 | |
Fred Drake | e4694eb | 1999-07-01 20:42:57 +0000 | [diff] [blame] | 223 | \item[\module{sv}] |
Fred Drake | 272fb3a | 1998-04-07 14:15:28 +0000 | [diff] [blame] | 224 | --- Interface to the ``simple video'' board on SGI Indigo |
Guido van Rossum | 8d2893b | 1997-03-27 20:57:52 +0000 | [diff] [blame] | 225 | (obsolete hardware). |
Fred Drake | 3700b6f | 1998-08-07 16:02:28 +0000 | [diff] [blame] | 226 | \end{description} |