1997-03-14 00:12:52 -04:00
|
|
|
\chapter{Undocumented Modules}
|
1998-02-18 11:47:17 -04:00
|
|
|
\label{undoc}
|
1997-03-14 00:12:52 -04:00
|
|
|
|
|
|
|
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}
|
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\begin{description}
|
|
|
|
\item[cPickle.c]
|
|
|
|
--- mostly the same as pickle but no subclassing
|
1997-08-20 23:29:19 -03:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[cStringIO.c]
|
|
|
|
--- mostly the same as StringIO but no subclassing
|
|
|
|
\end{description}
|
1997-08-20 23:29:19 -03:00
|
|
|
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1997-12-29 17:32:26 -04:00
|
|
|
\section{Frameworks; somewhat harder to document, but well worth the effort}
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\begin{description}
|
|
|
|
\item[Tkinter.py]
|
|
|
|
--- Interface to Tcl/Tk for graphical user interfaces;
|
1997-04-03 19:49:28 -04:00
|
|
|
Fredrik Lundh is working on this one!
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[CGIHTTPServer.py]
|
|
|
|
--- CGI-savvy HTTP Server
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[SimpleHTTPServer.py]
|
|
|
|
--- Simple HTTP Server
|
|
|
|
\end{description}
|
1997-03-14 00:12:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
\section{Stuff useful to a lot of people, including the CGI crowd}
|
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\begin{description}
|
|
|
|
\item[MimeWriter.py]
|
|
|
|
--- Generic MIME writer
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[multifile.py]
|
|
|
|
--- make each part of a multipart message ``feel'' like
|
|
|
|
|
|
|
|
\item[poplib.py]
|
|
|
|
--- Post Office Protocol client by Dave Ascher.
|
1998-04-09 15:54:01 -03:00
|
|
|
|
|
|
|
\item[smtplib.py]
|
|
|
|
--- Simple Mail Transfer Protocol (SMTP) client code.
|
1998-04-07 11:15:28 -03:00
|
|
|
\end{description}
|
1997-11-24 13:50:09 -04:00
|
|
|
|
1997-03-14 00:12:52 -04:00
|
|
|
|
|
|
|
\section{Miscellaneous useful utilities}
|
|
|
|
|
|
|
|
Some of these are very old and/or not very robust; marked with ``hmm''.
|
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\begin{description}
|
|
|
|
\item[calendar.py]
|
|
|
|
--- Calendar printing functions
|
1998-04-04 03:03:19 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[ConfigParser.py]
|
|
|
|
--- Parse a file of sectioned configuration parameters
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[cmp.py]
|
|
|
|
--- Efficiently compare files
|
1997-12-30 00:41:56 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[cmpcache.py]
|
|
|
|
--- Efficiently compare files (uses statcache)
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[dircache.py]
|
|
|
|
--- like os.listdir, but caches results
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[dircmp.py]
|
|
|
|
--- class to build directory diff tools on
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[linecache.py]
|
|
|
|
--- Cache lines from files (used by pdb)
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[pipes.py]
|
|
|
|
--- Conversion pipeline templates (hmm)
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[popen2.py]
|
|
|
|
--- improved popen, can read AND write simultaneously
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[statcache.py]
|
|
|
|
--- Maintain a cache of file stats
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[colorsys.py]
|
|
|
|
--- Conversion between RGB and other color systems
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[dbhash.py]
|
|
|
|
--- (g)dbm-like wrapper for bsdhash.hashopen
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[mhlib.py]
|
|
|
|
--- MH interface
|
1997-04-03 19:49:28 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[pty.py]
|
|
|
|
--- Pseudo terminal utilities
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[tty.py]
|
|
|
|
--- Terminal utilities
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[cmd.py]
|
|
|
|
--- build line-oriented command interpreters (used by pdb)
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[bdb.py]
|
|
|
|
--- A generic Python debugger base class (used by pdb)
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 16:09:32 -03:00
|
|
|
\item[wdb.py]
|
|
|
|
--- A primitive windowing debugger based on STDWIN.
|
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[ihooks.py]
|
|
|
|
--- Import hook support (for rexec)
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[bisect.py]
|
|
|
|
--- Bisection algorithms (this is actually useful at times,
|
1998-04-04 03:03:19 -04:00
|
|
|
especially as reference material)
|
1998-04-07 11:15:28 -03:00
|
|
|
\end{description}
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1997-08-14 23:52:46 -03:00
|
|
|
|
1997-03-14 00:12:52 -04:00
|
|
|
\section{Parsing Python}
|
|
|
|
|
|
|
|
(One could argue that these should all be documented together with the
|
1997-10-06 18:41:30 -03:00
|
|
|
parser module.)
|
1997-07-16 12:48:20 -03:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\begin{description}
|
|
|
|
\item[tokenize.py]
|
|
|
|
--- regular expression that recognizes Python tokens; also
|
1997-08-14 23:52:46 -03:00
|
|
|
contains helper code for colorizing Python source code.
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[pyclbr.py]
|
|
|
|
--- Parse a Python file and retrieve classes and methods
|
|
|
|
\end{description}
|
1997-03-14 00:12:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
\section{Platform specific modules}
|
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\begin{description}
|
|
|
|
\item[ntpath.py]
|
|
|
|
--- equivalent of posixpath on 32-bit Windows
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[dospath.py]
|
|
|
|
--- equivalent of posixpath on MS-DOS
|
|
|
|
\end{description}
|
1997-03-14 00:12:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
\section{Code objects and files, debugger etc.}
|
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\begin{description}
|
|
|
|
\item[compileall.py]
|
|
|
|
--- force "compilation" of all .py files in a directory
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[py_compile.py]
|
|
|
|
--- "compile" a .py file to a .pyc file
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[repr.py]
|
|
|
|
--- Redo the `...` (representation) but with limits on most
|
1997-03-14 00:12:52 -04:00
|
|
|
sizes (used by pdb)
|
1998-04-07 11:15:28 -03:00
|
|
|
\end{description}
|
1997-03-14 00:12:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
\section{Multimedia}
|
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\begin{description}
|
|
|
|
\item[audiodev.py]
|
|
|
|
--- Plays audio files
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[sunau.py]
|
|
|
|
--- parse Sun and NeXT audio files
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[sunaudio.py]
|
|
|
|
--- interpret sun audio headers
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[toaiff.py]
|
|
|
|
--- Convert "arbitrary" sound files to AIFF files
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[sndhdr.py]
|
|
|
|
--- recognizing sound files
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[wave.py]
|
|
|
|
--- parse WAVE files
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[whatsound.py]
|
|
|
|
--- recognizing sound files
|
|
|
|
\end{description}
|
1997-03-14 00:12:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
\section{Oddities}
|
|
|
|
|
|
|
|
These modules are probably also obsolete, or just not very useful.
|
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\begin{description}
|
|
|
|
\item[dump.py]
|
|
|
|
--- Print python code that reconstructs a variable
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[find.py]
|
|
|
|
--- find files matching pattern in directory tree
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[fpformat.py]
|
|
|
|
--- General floating point formatting functions ---
|
1998-04-04 03:03:19 -04:00
|
|
|
interesting demonstration of how to do this without using the \C{}
|
|
|
|
library
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[grep.py]
|
|
|
|
--- grep
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[mutex.py]
|
|
|
|
--- Mutual exclusion --- for use with module sched
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[packmail.py]
|
|
|
|
--- create a self-unpacking \UNIX{} shell archive
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[poly.py]
|
|
|
|
--- Polynomials
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[sched.py]
|
|
|
|
--- event scheduler class
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[shutil.py]
|
|
|
|
--- utility functions usable in a shell-like program
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[util.py]
|
|
|
|
--- useful functions that don't fit elsewhere
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[zmod.py]
|
|
|
|
--- Compute properties of mathematical "fields"
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[tzparse.py]
|
|
|
|
--- Parse a timezone specification (unfinished)
|
|
|
|
\end{description}
|
1997-03-14 00:12:52 -04:00
|
|
|
|
|
|
|
|
|
|
|
\section{Obsolete}
|
|
|
|
|
1998-04-04 03:03:19 -04:00
|
|
|
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
|
1998-04-09 11:32:28 -03:00
|
|
|
\file{\textrm{\$prefix}/lib/python1.5/}. To use any of these
|
1998-04-04 03:03:19 -04:00
|
|
|
modules, add that directory to \code{sys.path}, possibly using
|
|
|
|
\envvar{PYTHONPATH}.
|
1997-07-16 12:48:20 -03:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\begin{description}
|
|
|
|
\item[newdir.py]
|
|
|
|
--- New dir() function (the standard dir() is now just as good)
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[addpack.py]
|
|
|
|
--- standard support for "packages"
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[fmt.py]
|
|
|
|
--- text formatting abstractions (too slow)
|
1997-03-14 00:12:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[Para.py]
|
|
|
|
--- helper for fmt.py
|
1998-04-04 03:03:19 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[lockfile.py]
|
|
|
|
--- wrapper around FCNTL file locking (use
|
1997-03-14 00:12:52 -04:00
|
|
|
fcntl.lockf/flock intead)
|
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[tb.py]
|
|
|
|
--- Print tracebacks, with a dump of local variables (use
|
1997-03-14 00:12:52 -04:00
|
|
|
pdb.pm() or traceback.py instead)
|
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[codehack.py]
|
|
|
|
--- extract function name or line number from a function
|
1997-07-18 18:08:07 -03:00
|
|
|
code object (these are now accessible as attributes: co.co_name,
|
|
|
|
func.func_name, co.co_firstlineno)
|
1998-04-07 11:15:28 -03:00
|
|
|
\end{description}
|
1997-07-18 18:08:07 -03:00
|
|
|
|
1998-04-09 11:32:28 -03:00
|
|
|
The following modules were documented in previous versions of this
|
|
|
|
manual, but are now considered obsolete:
|
|
|
|
|
|
|
|
\begin{description}
|
|
|
|
\item[ni]
|
|
|
|
--- Import modules in ``packages.''
|
|
|
|
|
|
|
|
\item[rand]
|
|
|
|
--- Old interface to the random number generator.
|
|
|
|
|
|
|
|
\item[soundex]
|
|
|
|
--- Algorithm for collapsing names which sound similar to a shared
|
|
|
|
key. (This is an extension module.)
|
|
|
|
\end{description}
|
|
|
|
|
1997-03-14 00:12:52 -04:00
|
|
|
|
|
|
|
\section{Extension modules}
|
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\begin{description}
|
|
|
|
\item[bsddbmodule.c]
|
|
|
|
--- Interface to the Berkeley DB interface (yet another
|
1997-03-27 16:57:52 -04:00
|
|
|
dbm clone).
|
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[cursesmodule.c]
|
|
|
|
--- Curses interface.
|
1997-03-27 16:57:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[dlmodule.c]
|
|
|
|
--- A highly experimental and dangerous device for calling
|
1997-03-27 16:57:52 -04:00
|
|
|
arbitrary C functions in arbitrary shared libraries.
|
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[newmodule.c]
|
|
|
|
--- Tommy Burnette's `new' module (creates new empty objects of
|
|
|
|
certain kinds) --- dangerous.
|
1997-03-27 16:57:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[nismodule.c]
|
|
|
|
--- NIS (a.k.a. Sun's Yellow Pages) interface.
|
1997-03-27 16:57:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[timingmodule.c]
|
|
|
|
--- Measure time intervals to high resolution (obsolete --- use
|
|
|
|
time.clock() instead).
|
1997-03-27 16:57:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[stdwinmodule.c]
|
|
|
|
--- Interface to STDWIN (an old, unsupported
|
1997-06-02 14:34:02 -03:00
|
|
|
platform-independent GUI package). Obsolete; use Tkinter for a
|
|
|
|
platform-independent GUI instead.
|
|
|
|
|
1997-03-27 16:57:52 -04:00
|
|
|
The following are SGI specific:
|
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[clmodule.c]
|
|
|
|
--- Interface to the SGI compression library.
|
1997-03-27 16:57:52 -04:00
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[svmodule.c]
|
|
|
|
--- Interface to the ``simple video'' board on SGI Indigo
|
1997-03-27 16:57:52 -04:00
|
|
|
(obsolete hardware).
|
1998-03-02 22:00:14 -04:00
|
|
|
|
|
|
|
The following is Windows specific:
|
|
|
|
|
1998-04-07 11:15:28 -03:00
|
|
|
\item[msvcrtmodule.c]
|
|
|
|
(in directory \file{PC/}) --- define a number of Windows
|
1998-03-02 22:00:14 -04:00
|
|
|
specific goodies like \code{khbit()}, \code{getch()} and
|
|
|
|
\code{setmode()}. (Windows 95 and NT only.)
|
1998-04-07 11:15:28 -03:00
|
|
|
\end{description}
|