summaryrefslogtreecommitdiffstats
path: root/Doc/libundoc.tex
blob: 3cd5d91c0c60eb6a3b9c28973035a2ff67aa49a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
\chapter{Undocumented Modules}
\label{undoc}

Here's a quick listing of modules that are currently undocumented, but
that should be documented.  Feel free to contribute documentation for
them!  (The idea and most contents for this chapter were taken from a
posting by Fredrik Lundh; I have revised some modules' status.)


\section{Fundamental, and pretty straightforward to document}

\begin{description}
\item[cPickle.c]
--- mostly the same as pickle but no subclassing

\item[cStringIO.c]
--- mostly the same as StringIO but no subclassing
\end{description}


\section{Frameworks; somewhat harder to document, but well worth the effort}

\begin{description}
\item[Tkinter.py]
--- Interface to Tcl/Tk for graphical user interfaces;
Fredrik Lundh is working on this one!

\item[CGIHTTPServer.py]
--- CGI-savvy HTTP Server

\item[SimpleHTTPServer.py]
--- Simple HTTP Server
\end{description}


\section{Stuff useful to a lot of people, including the CGI crowd}

\begin{description}
\item[MimeWriter.py]
--- Generic MIME writer

\item[multifile.py]
--- make each part of a multipart message ``feel'' like

\item[poplib.py]
--- Post Office Protocol client by Dave Ascher.
\end{description}


\section{Miscellaneous useful utilities}

Some of these are very old and/or not very robust; marked with ``hmm''.

\begin{description}
\item[calendar.py]
--- Calendar printing functions

\item[ConfigParser.py]
--- Parse a file of sectioned configuration parameters

\item[cmp.py]
--- Efficiently compare files

\item[cmpcache.py]
--- Efficiently compare files (uses statcache)

\item[dircache.py]
--- like os.listdir, but caches results

\item[dircmp.py]
--- class to build directory diff tools on

\item[linecache.py]
--- Cache lines from files (used by pdb)

\item[pipes.py]
--- Conversion pipeline templates (hmm)

\item[popen2.py]
--- improved popen, can read AND write simultaneously

\item[statcache.py]
--- Maintain a cache of file stats

\item[colorsys.py]
--- Conversion between RGB and other color systems

\item[dbhash.py]
--- (g)dbm-like wrapper for bsdhash.hashopen

\item[mhlib.py]
--- MH interface

\item[pty.py]
--- Pseudo terminal utilities

\item[tty.py]
--- Terminal utilities

\item[cmd.py]
--- build line-oriented command interpreters (used by pdb)

\item[bdb.py]
--- A generic Python debugger base class (used by pdb)

\item[ihooks.py]
--- Import hook support (for rexec)

\item[bisect.py]
--- Bisection algorithms (this is actually useful at times,
especially as reference material)
\end{description}


\section{Parsing Python}

(One could argue that these should all be documented together with the
parser module.)

\begin{description}
\item[tokenize.py]
--- regular expression that recognizes Python tokens; also
contains helper code for colorizing Python source code.

\item[pyclbr.py]
--- Parse a Python file and retrieve classes and methods
\end{description}


\section{Platform specific modules}

\begin{description}
\item[ntpath.py]
--- equivalent of posixpath on 32-bit Windows

\item[dospath.py]
--- equivalent of posixpath on MS-DOS
\end{description}


\section{Code objects and files, debugger etc.}

\begin{description}
\item[compileall.py]
--- force "compilation" of all .py files in a directory

\item[py_compile.py]
--- "compile" a .py file to a .pyc file

\item[repr.py]
--- Redo the `...` (representation) but with limits on most
sizes (used by pdb)
\end{description}


\section{Multimedia}

\begin{description}
\item[audiodev.py]
--- Plays audio files

\item[sunau.py]
--- parse Sun and NeXT audio files

\item[sunaudio.py]
--- interpret sun audio headers

\item[toaiff.py]
--- Convert "arbitrary" sound files to AIFF files

\item[sndhdr.py]
--- recognizing sound files

\item[wave.py]
--- parse WAVE files

\item[whatsound.py]
--- recognizing sound files
\end{description}


\section{Oddities}

These modules are probably also obsolete, or just not very useful.

\begin{description}
\item[dump.py]
--- Print python code that reconstructs a variable

\item[find.py]
--- find files matching pattern in directory tree

\item[fpformat.py]
--- General floating point formatting functions ---
interesting demonstration of how to do this without using the \C{}
library

\item[grep.py]
--- grep

\item[mutex.py]
--- Mutual exclusion --- for use with module sched

\item[packmail.py]
--- create a self-unpacking \UNIX{} shell archive

\item[poly.py]
--- Polynomials

\item[sched.py]
--- event scheduler class

\item[shutil.py]
--- utility functions usable in a shell-like program

\item[util.py]
--- useful functions that don't fit elsewhere

\item[zmod.py]
--- Compute properties of mathematical "fields"

\item[tzparse.py]
--- Parse a timezone specification (unfinished)
\end{description}


\section{Obsolete}

These modules are not on the standard module search path;
\indexiii{module}{search}{path}
but are available in the directory \file{lib-old/} installed  under
\file{\textrm{\$prefix}/lib/python\version/}.  To use any of these
modules, add that directory to \code{sys.path}, possibly using
\envvar{PYTHONPATH}.

\begin{description}
\item[newdir.py]
--- New dir() function (the standard dir() is now just as good)

\item[addpack.py]
--- standard support for "packages"

\item[fmt.py]
--- text formatting abstractions (too slow)

\item[Para.py]
--- helper for fmt.py

\item[lockfile.py]
--- wrapper around FCNTL file locking (use
fcntl.lockf/flock intead)

\item[tb.py]
--- Print tracebacks, with a dump of local variables (use
pdb.pm() or traceback.py instead)

\item[codehack.py]
--- extract function name or line number from a function
code object (these are now accessible as attributes: co.co_name,
func.func_name, co.co_firstlineno)
\end{description}


\section{Extension modules}

\begin{description}
\item[bsddbmodule.c]
--- Interface to the Berkeley DB interface (yet another
dbm clone).

\item[cursesmodule.c]
--- Curses interface.

\item[dlmodule.c]
---  A highly experimental and dangerous device for calling
arbitrary C functions in arbitrary shared libraries.

\item[newmodule.c]
--- Tommy Burnette's `new' module (creates new empty objects of
certain kinds) --- dangerous.

\item[nismodule.c]
--- NIS (a.k.a. Sun's Yellow Pages) interface.

\item[timingmodule.c]
--- Measure time intervals to high resolution (obsolete --- use
time.clock() instead).

\item[stdwinmodule.c]
--- Interface to STDWIN (an old, unsupported
platform-independent GUI package).  Obsolete; use Tkinter for a
platform-independent GUI instead.

The following are SGI specific:

\item[clmodule.c]
--- Interface to the SGI compression library.

\item[svmodule.c]
--- Interface to the ``simple video'' board on SGI Indigo
(obsolete hardware).

The following is Windows specific:

\item[msvcrtmodule.c]
(in directory \file{PC/}) --- define a number of Windows
specific goodies like \code{khbit()}, \code{getch()} and
\code{setmode()}.  (Windows 95 and NT only.)
\end{description}