cpython-withatomic / Doc / libundoc.tex

The branch 'legacy-trunk' does not exist.
\chapter{Undocumented Modules}

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}

cPickle.c -- mostly the same as pickle but no subclassing

cStringIO.c -- mostly the same as StringIO but no subclassing

\section{Frameworks; somewhat harder to document, but
well worth the effort} -- Interface to Tcl/Tk for graphical user interfaces;
Fredrik Lundh is working on this one! -- HTTP server base class -- CGI-savvy HTTP Server -- Simple HTTP Server

\section{Stuff useful to a lot of people, including the CGI crowd} -- Generic MIME writer -- make each part of a multipart message ``feel'' like -- convenient loop over the lines in a list of input files.

\section{Miscellaneous useful utilities}

Some of these are very old and/or not very robust; marked with ``hmm''. -- Calendar printing functions -- Efficiently compare files -- Efficiently compare files (uses statcache) -- like os.listdir, but caches results -- class to build directory diff tools on -- Cache lines from files (used by pdb) -- Conversion pipeline templates (hmm) -- improved popen, can read AND write simultaneously -- Maintain a cache of file stats -- Conversion between RGB and other color systems -- (g)dbm-like wrapper for bsdhash.hashopen -- MH interface -- Pseudo terminal utilities -- Terminal utilities -- build line-oriented command interpreters (used by pdb) -- A generic Python debugger base class (used by pdb) -- Import hook support (for ni and rexec)

\section{Parsing Python}

(One could argue that these should all be documented together with the
parser module.) -- regular expression that recognizes Python tokens; also
contains helper code for colorizing Python source code. -- Parse a Python file and retrieve classes and methods

\section{Platform specific modules} -- equivalent of posixpath on 32-bit Windows -- equivalent of posixpath on MS-DOS

\section{Code objects and files, debugger etc.} -- force "compilation" of all .py files in a directory -- "compile" a .py file to a .pyc file -- Redo the `...` (representation) but with limits on most
sizes (used by pdb) -- helper to provide extensibility for pickle/cPickle

\section{Multimedia} -- Plays audio files -- parse Sun and NeXT audio files -- interpret sun audio headers -- Convert "arbitrary" sound files to AIFF files -- recognizing sound files -- parse WAVE files -- recognizing sound files


These modules are probably also obsolete, or just not very useful. -- Bisection algorithms (this is actually useful at times) -- Print python code that reconstructs a variable -- find files matching pattern in directory tree -- General floating point formatting functions -- obsolete -- grep -- Mutual exclusion -- for use with module sched -- create a self-unpacking \UNIX{} shell archive -- Polynomials -- event scheduler class -- utility functions usable in a shell-like program -- useful functions that don't fit elsewhere -- Compute properties of mathematical "fields" -- Parse a timezone specification (unfinished)

\section{Obsolete} -- New dir() function (the standard dir() is now just as good) -- standard support for "packages" (use ni instead) -- text formatting abstractions (too slow) -- helper for -- wrapper around FCNTL file locking (use
fcntl.lockf/flock intead) -- Print tracebacks, with a dump of local variables (use or instead) -- 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)

\section{Extension modules}

bsddbmodule.c -- Interface to the Berkeley DB interface (yet another
dbm clone).

cursesmodule.c -- Curses interface.

dbhashmodule.c -- Obsolete; this functionality is now provided by

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

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

nismodule.c -- NIS (a.k.a. Sun's Yellow Pages) interface.

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

resource.c -- Interface to getrusage() and friends.

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:

clmodule.c -- Interface to the SGI compression library.

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