blob: 4501a5b2b772aa00ee5ba91501e817ac112c47d0 [file] [log] [blame]
Guido van Rossum612316f1997-03-14 04:12:52 +00001\chapter{Undocumented Modules}
2
3Here's a quick listing of modules that are currently undocumented, but
4that should be documented. Feel free to contribute documentation for
5them! (The idea and most contents for this chapter were taken from a
6posting by Fredrik Lundh; I have revised some modules' status.)
7
8
9\section{Fundamental, and pretty straightforward to document}
10
Guido van Rossum612316f1997-03-14 04:12:52 +000011ni.py -- New import scheme with package support
12
Guido van Rossum612316f1997-03-14 04:12:52 +000013
14\section{Frameworks; somewhat harder to document, but
15well worth the effort}
16
17Tkinter.py -- Interface to Tcl/Tk for graphical user interfaces;
Guido van Rossum15085381997-04-03 23:49:28 +000018Fredrik Lundh is working on this one!
Guido van Rossum612316f1997-03-14 04:12:52 +000019
20BaseHTTPServer.py -- HTTP server base class
21
22CGIHTTPServer.py -- CGI-savvy HTTP Server
23
24SimpleHTTPServer.py -- Simple HTTP Server
25
Guido van Rossum612316f1997-03-14 04:12:52 +000026
27\section{Stuff useful to a lot of people, including the CGI crowd}
28
29MimeWriter.py -- Generic MIME writer
30
Guido van Rossum612316f1997-03-14 04:12:52 +000031multifile.py -- make each part of a multipart message ``feel'' like
32
Guido van Rossum612316f1997-03-14 04:12:52 +000033
34\section{Miscellaneous useful utilities}
35
36Some of these are very old and/or not very robust; marked with ``hmm''.
37
Guido van Rossum612316f1997-03-14 04:12:52 +000038calendar.py -- Calendar printing functions
39
40cmp.py -- Efficiently compare files
41
42cmpcache.py -- Efficiently compare files (uses statcache)
43
44dircache.py -- like os.listdir, but caches results
45
46dircmp.py -- class to build directory diff tools on
47
48linecache.py -- Cache lines from files (used by pdb)
49
50pipes.py -- Conversion pipeline templates (hmm)
51
Guido van Rossum5bbf0f71997-04-30 19:41:48 +000052popen2.py -- improved popen, can read AND write simultaneously
Guido van Rossum612316f1997-03-14 04:12:52 +000053
Guido van Rossum612316f1997-03-14 04:12:52 +000054statcache.py -- Maintain a cache of file stats
55
56colorsys.py -- Conversion between RGB and other color systems
57
Guido van Rossum15085381997-04-03 23:49:28 +000058dbhash.py -- (g)dbm-like wrapper for bsdhash.hashopen
59
Guido van Rossum612316f1997-03-14 04:12:52 +000060mhlib.py -- MH interface
61
62pty.py -- Pseudo terminal utilities
63
64tty.py -- Terminal utilities
65
66cmd.py -- build line-oriented command interpreters (used by pdb)
67
Guido van Rossum612316f1997-03-14 04:12:52 +000068bdb.py -- A generic Python debugger base class (used by pdb)
69
70ihooks.py -- Import hook support (for ni and rexec)
71
Guido van Rossum90858221997-08-15 02:52:46 +000072
Guido van Rossum612316f1997-03-14 04:12:52 +000073\section{Parsing Python}
74
75(One could argue that these should all be documented together with the
76parser module; in fact the parser module section already references
77the token and symbol modules.)
78
79token.py -- Tokens (from ``token.h'')
80
81symbol.py -- Symbols (from ``graminit.h'')
82
Guido van Rossumcfaf1431997-07-16 15:48:20 +000083keyword.py -- Keywords (from ``graminit.c'')
84
Guido van Rossum90858221997-08-15 02:52:46 +000085tokenize.py -- regular expression that recognizes Python tokens; also
86contains helper code for colorizing Python source code.
Guido van Rossum612316f1997-03-14 04:12:52 +000087
Guido van Rossum612316f1997-03-14 04:12:52 +000088pyclbr.py -- Parse a Python file and retrieve classes and methods
89
Guido van Rossum90858221997-08-15 02:52:46 +000090code.py -- Deal with Python code objects: code.compile_command() can
91determine whether an interactively entered command is complete or not,
92distinguishing incomplete from invalid input.
93
Guido van Rossum612316f1997-03-14 04:12:52 +000094
95\section{Platform specific modules}
96
97ntpath.py -- equivalent of posixpath on 32-bit Windows
98
99dospath.py -- equivalent of posixpath on MS-DOS
100
101macpath.py -- equivalent of posixpath on Mac
102
103
104\section{Code objects and files, debugger etc.}
105
106compileall.py -- force "compilation" of all .py files in a directory
107
108py_compile.py -- "compile" a .py file to a .pyc file
109
Guido van Rossum612316f1997-03-14 04:12:52 +0000110dis.py -- Disassembler for Python bytecode objects
111
112repr.py -- Redo the `...` (representation) but with limits on most
113sizes (used by pdb)
114
Guido van Rossumcfaf1431997-07-16 15:48:20 +0000115copy_reg.py -- helper to provide extensibility for pickle/cPickle
Guido van Rossum612316f1997-03-14 04:12:52 +0000116
117
118\section{Multimedia}
119
120audiodev.py -- Plays audio files
121
122sunau.py -- parse Sun and NeXT audio files
123
124sunaudio.py -- interpret sun audio headers
125
126toaiff.py -- Convert "arbitrary" sound files to AIFF files
127
128sndhdr.py -- recognizing sound files
129
130wave.py -- parse WAVE files
131
132whatsound.py -- recognizing sound files
133
134
135\section{Oddities}
136
137These modules are probably also obsolete, or just not very useful.
138
139Queue.py -- A multi-producer, multi-consumer queue
Guido van Rossumcfaf1431997-07-16 15:48:20 +0000140p
Guido van Rossum612316f1997-03-14 04:12:52 +0000141bisect.py -- Bisection algorithms
142
143dump.py -- Print python code that reconstructs a variable
144
145emacs.py -- Execute Emacs code from a Python interpreter
146
147find.py -- find files matching pattern in directory tree
148
Guido van Rossum15085381997-04-03 23:49:28 +0000149fpformat.py -- General floating point formatting functions -- obsolete
Guido van Rossum612316f1997-03-14 04:12:52 +0000150
151grep.py -- grep
152
153mutex.py -- Mutual exclusion -- for use with module sched
154
Guido van Rossum5bbf0f71997-04-30 19:41:48 +0000155packmail.py -- create a self-unpacking \UNIX{} shell archive
Guido van Rossum612316f1997-03-14 04:12:52 +0000156
157poly.py -- Polynomials
158
159sched.py -- event scheduler class
160
161shutil.py -- utility functions usable in a shell-like program
162
163util.py -- useful functions that don't fit elsewhere
164
165zmod.py -- Compute properties of mathematical "fields"
166
167tzparse.py -- Parse a timezone specification (unfinished)
168
169
170\section{Obsolete}
171
Guido van Rossumcfaf1431997-07-16 15:48:20 +0000172newdir.py -- New dir() function (the standard dir() is now just as good)
173
Guido van Rossum612316f1997-03-14 04:12:52 +0000174addpack.py -- standard support for "packages" (use ni instead)
175
Guido van Rossum15085381997-04-03 23:49:28 +0000176fmt.py -- text formatting abstractions (too slow)
Guido van Rossum612316f1997-03-14 04:12:52 +0000177
178Para.py -- helper for fmt.py
179
180lockfile.py -- wrapper around FCNTL file locking (use
181fcntl.lockf/flock intead)
182
183tb.py -- Print tracebacks, with a dump of local variables (use
184pdb.pm() or traceback.py instead)
185
Guido van Rossum61c27031997-07-18 21:08:07 +0000186codehack.py -- extract function name or line number from a function
187code object (these are now accessible as attributes: co.co_name,
188func.func_name, co.co_firstlineno)
189
Guido van Rossum612316f1997-03-14 04:12:52 +0000190
191\section{Extension modules}
192
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000193bsddbmodule.c -- Interface to the Berkeley DB interface (yet another
194dbm clone).
195
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000196cursesmodule.c -- Curses interface.
197
Guido van Rossumb9ee9c21997-06-02 17:34:02 +0000198dbhashmodule.c -- Obsolete; this functionality is now provided by
199bsddbmodule.c.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000200
201dlmodule.c -- A highly experimental and dangerous device for calling
202arbitrary C functions in arbitrary shared libraries.
203
204newmodule.c -- Tommy Burnette's `new' module (creates new empty
205objects of certain kinds) -- dangerous.
206
207nismodule.c -- NIS (a.k.a. Sun's Yellow Pages) interface.
208
209timingmodule.c -- Measure time intervals to high resolution (obsolete
210-- use time.clock() instead).
211
Guido van Rossum5bbf0f71997-04-30 19:41:48 +0000212resource.c -- Interface to getrusage() and friends.
213
Guido van Rossumb9ee9c21997-06-02 17:34:02 +0000214stdwinmodule.c -- Interface to STDWIN (an old, unsupported
215platform-independent GUI package). Obsolete; use Tkinter for a
216platform-independent GUI instead.
217
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000218The following are SGI specific:
219
220clmodule.c -- Interface to the SGI compression library.
221
222svmodule.c -- Interface to the ``simple video'' board on SGI Indigo
223(obsolete hardware).