blob: 368c6a412a3d1b09c27883fa09a15e560ba3480d [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 Rossum08157f81997-08-21 02:29:19 +000013cPickle.c -- mostly the same as pickle but no subclassing
14
15cStringIO.c -- mostly the same as StringIO but no subclassing
16
Guido van Rossum612316f1997-03-14 04:12:52 +000017
18\section{Frameworks; somewhat harder to document, but
19well worth the effort}
20
21Tkinter.py -- Interface to Tcl/Tk for graphical user interfaces;
Guido van Rossum15085381997-04-03 23:49:28 +000022Fredrik Lundh is working on this one!
Guido van Rossum612316f1997-03-14 04:12:52 +000023
24BaseHTTPServer.py -- HTTP server base class
25
26CGIHTTPServer.py -- CGI-savvy HTTP Server
27
28SimpleHTTPServer.py -- Simple HTTP Server
29
Guido van Rossum612316f1997-03-14 04:12:52 +000030
31\section{Stuff useful to a lot of people, including the CGI crowd}
32
33MimeWriter.py -- Generic MIME writer
34
Guido van Rossum612316f1997-03-14 04:12:52 +000035multifile.py -- make each part of a multipart message ``feel'' like
36
Guido van Rossum612316f1997-03-14 04:12:52 +000037
38\section{Miscellaneous useful utilities}
39
40Some of these are very old and/or not very robust; marked with ``hmm''.
41
Guido van Rossum612316f1997-03-14 04:12:52 +000042calendar.py -- Calendar printing functions
43
44cmp.py -- Efficiently compare files
45
46cmpcache.py -- Efficiently compare files (uses statcache)
47
48dircache.py -- like os.listdir, but caches results
49
50dircmp.py -- class to build directory diff tools on
51
52linecache.py -- Cache lines from files (used by pdb)
53
54pipes.py -- Conversion pipeline templates (hmm)
55
Guido van Rossum5bbf0f71997-04-30 19:41:48 +000056popen2.py -- improved popen, can read AND write simultaneously
Guido van Rossum612316f1997-03-14 04:12:52 +000057
Guido van Rossum612316f1997-03-14 04:12:52 +000058statcache.py -- Maintain a cache of file stats
59
60colorsys.py -- Conversion between RGB and other color systems
61
Guido van Rossum15085381997-04-03 23:49:28 +000062dbhash.py -- (g)dbm-like wrapper for bsdhash.hashopen
63
Guido van Rossum612316f1997-03-14 04:12:52 +000064mhlib.py -- MH interface
65
66pty.py -- Pseudo terminal utilities
67
68tty.py -- Terminal utilities
69
70cmd.py -- build line-oriented command interpreters (used by pdb)
71
Guido van Rossum612316f1997-03-14 04:12:52 +000072bdb.py -- A generic Python debugger base class (used by pdb)
73
74ihooks.py -- Import hook support (for ni and rexec)
75
Guido van Rossum90858221997-08-15 02:52:46 +000076
Guido van Rossum612316f1997-03-14 04:12:52 +000077\section{Parsing Python}
78
79(One could argue that these should all be documented together with the
80parser module; in fact the parser module section already references
81the token and symbol modules.)
82
83token.py -- Tokens (from ``token.h'')
84
85symbol.py -- Symbols (from ``graminit.h'')
86
Guido van Rossumcfaf1431997-07-16 15:48:20 +000087keyword.py -- Keywords (from ``graminit.c'')
88
Guido van Rossum90858221997-08-15 02:52:46 +000089tokenize.py -- regular expression that recognizes Python tokens; also
90contains helper code for colorizing Python source code.
Guido van Rossum612316f1997-03-14 04:12:52 +000091
Guido van Rossum612316f1997-03-14 04:12:52 +000092pyclbr.py -- Parse a Python file and retrieve classes and methods
93
Guido van Rossum90858221997-08-15 02:52:46 +000094code.py -- Deal with Python code objects: code.compile_command() can
95determine whether an interactively entered command is complete or not,
96distinguishing incomplete from invalid input.
97
Guido van Rossum612316f1997-03-14 04:12:52 +000098
99\section{Platform specific modules}
100
101ntpath.py -- equivalent of posixpath on 32-bit Windows
102
103dospath.py -- equivalent of posixpath on MS-DOS
104
105macpath.py -- equivalent of posixpath on Mac
106
107
108\section{Code objects and files, debugger etc.}
109
110compileall.py -- force "compilation" of all .py files in a directory
111
112py_compile.py -- "compile" a .py file to a .pyc file
113
Guido van Rossum612316f1997-03-14 04:12:52 +0000114dis.py -- Disassembler for Python bytecode objects
115
116repr.py -- Redo the `...` (representation) but with limits on most
117sizes (used by pdb)
118
Guido van Rossumcfaf1431997-07-16 15:48:20 +0000119copy_reg.py -- helper to provide extensibility for pickle/cPickle
Guido van Rossum612316f1997-03-14 04:12:52 +0000120
121
122\section{Multimedia}
123
124audiodev.py -- Plays audio files
125
126sunau.py -- parse Sun and NeXT audio files
127
128sunaudio.py -- interpret sun audio headers
129
130toaiff.py -- Convert "arbitrary" sound files to AIFF files
131
132sndhdr.py -- recognizing sound files
133
134wave.py -- parse WAVE files
135
136whatsound.py -- recognizing sound files
137
138
139\section{Oddities}
140
141These modules are probably also obsolete, or just not very useful.
142
143Queue.py -- A multi-producer, multi-consumer queue
Guido van Rossumcfaf1431997-07-16 15:48:20 +0000144p
Guido van Rossum612316f1997-03-14 04:12:52 +0000145bisect.py -- Bisection algorithms
146
147dump.py -- Print python code that reconstructs a variable
148
149emacs.py -- Execute Emacs code from a Python interpreter
150
151find.py -- find files matching pattern in directory tree
152
Guido van Rossum15085381997-04-03 23:49:28 +0000153fpformat.py -- General floating point formatting functions -- obsolete
Guido van Rossum612316f1997-03-14 04:12:52 +0000154
155grep.py -- grep
156
157mutex.py -- Mutual exclusion -- for use with module sched
158
Guido van Rossum5bbf0f71997-04-30 19:41:48 +0000159packmail.py -- create a self-unpacking \UNIX{} shell archive
Guido van Rossum612316f1997-03-14 04:12:52 +0000160
161poly.py -- Polynomials
162
163sched.py -- event scheduler class
164
165shutil.py -- utility functions usable in a shell-like program
166
167util.py -- useful functions that don't fit elsewhere
168
169zmod.py -- Compute properties of mathematical "fields"
170
171tzparse.py -- Parse a timezone specification (unfinished)
172
173
174\section{Obsolete}
175
Guido van Rossumcfaf1431997-07-16 15:48:20 +0000176newdir.py -- New dir() function (the standard dir() is now just as good)
177
Guido van Rossum612316f1997-03-14 04:12:52 +0000178addpack.py -- standard support for "packages" (use ni instead)
179
Guido van Rossum15085381997-04-03 23:49:28 +0000180fmt.py -- text formatting abstractions (too slow)
Guido van Rossum612316f1997-03-14 04:12:52 +0000181
182Para.py -- helper for fmt.py
183
184lockfile.py -- wrapper around FCNTL file locking (use
185fcntl.lockf/flock intead)
186
187tb.py -- Print tracebacks, with a dump of local variables (use
188pdb.pm() or traceback.py instead)
189
Guido van Rossum61c27031997-07-18 21:08:07 +0000190codehack.py -- extract function name or line number from a function
191code object (these are now accessible as attributes: co.co_name,
192func.func_name, co.co_firstlineno)
193
Guido van Rossum612316f1997-03-14 04:12:52 +0000194
195\section{Extension modules}
196
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000197bsddbmodule.c -- Interface to the Berkeley DB interface (yet another
198dbm clone).
199
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000200cursesmodule.c -- Curses interface.
201
Guido van Rossumb9ee9c21997-06-02 17:34:02 +0000202dbhashmodule.c -- Obsolete; this functionality is now provided by
203bsddbmodule.c.
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000204
205dlmodule.c -- A highly experimental and dangerous device for calling
206arbitrary C functions in arbitrary shared libraries.
207
208newmodule.c -- Tommy Burnette's `new' module (creates new empty
209objects of certain kinds) -- dangerous.
210
211nismodule.c -- NIS (a.k.a. Sun's Yellow Pages) interface.
212
213timingmodule.c -- Measure time intervals to high resolution (obsolete
214-- use time.clock() instead).
215
Guido van Rossum5bbf0f71997-04-30 19:41:48 +0000216resource.c -- Interface to getrusage() and friends.
217
Guido van Rossumb9ee9c21997-06-02 17:34:02 +0000218stdwinmodule.c -- Interface to STDWIN (an old, unsupported
219platform-independent GUI package). Obsolete; use Tkinter for a
220platform-independent GUI instead.
221
Guido van Rossum8d2893b1997-03-27 20:57:52 +0000222The following are SGI specific:
223
224clmodule.c -- Interface to the SGI compression library.
225
226svmodule.c -- Interface to the ``simple video'' board on SGI Indigo
227(obsolete hardware).