cpython/Doc/lib/libundoc.tex

308 lines
6.9 KiB
TeX
Raw Normal View History

\chapter{Undocumented Modules}
1998-02-18 11:47:17 -04:00
\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{Frameworks; somewhat harder to document, but well worth the effort}
\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!
1998-04-14 01:55:43 -03:00
\item[Tkdnd.py]
--- Drag-and-drop support for \module{Tkinter}.
\item[CGIHTTPServer.py]
--- CGI-savvy HTTP Server
\item[SimpleHTTPServer.py]
--- Simple HTTP Server
\item[test]
--- Regression testing framework. This is used for the Python
regression test, but is useful for other Python libraries as well.
This is a package rather than a module.
\end{description}
\section{Stuff useful to a lot of people, including the CGI crowd}
\begin{description}
\item[MimeWriter.py]
--- Generic MIME writer
\end{description}
1997-11-24 13:50:09 -04:00
\section{Miscellaneous useful utilities}
Some of these are very old and/or not very robust; marked with ``hmm''.
\begin{description}
\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[getpass.py]
--- Utilities to get a password and/or the current user name.
\item[linecache.py]
--- Cache lines from files (used by pdb)
\item[pipes.py]
--- Conversion pipeline templates (hmm)
\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
1997-04-03 19:49:28 -04:00
\item[pty.py]
--- Pseudo terminal utilities
\item[tty.py]
--- Terminal utilities
\item[bdb.py]
--- A generic Python debugger base class (used by pdb)
1998-04-07 16:09:32 -03:00
\item[wdb.py]
--- A primitive windowing debugger based on STDWIN.
\item[ihooks.py]
--- Import hook support (for rexec)
\end{description}
1997-08-14 23:52:46 -03: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
\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.
\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[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
1998-08-07 13:02:28 -03:00
\file{\textrm{\$prefix}/lib/python1.5/}. % $ <-- bow to font lock
To use any of these modules, add that directory to \code{sys.path},
possibly using \envvar{PYTHONPATH}.
1997-07-16 12:48:20 -03:00
\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
1998-08-07 13:02:28 -03:00
\function{fcntl.lockf()}/\function{flock()} intead)
\item[tb.py]
--- Print tracebacks, with a dump of local variables (use
1998-08-07 13:02:28 -03:00
\function{pdb.pm()} or \module{traceback} instead)
\item[codehack.py]
1998-08-07 13:02:28 -03:00
--- 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,
1998-08-07 13:02:28 -03:00
func.func_name, co.co_firstlineno).
\item[timingmodule]
--- Measure time intervals to high resolution (use
\function{time.clock()} instead). (This is an extension module.)
\end{description}
1997-07-18 18:08:07 -03:00
The following modules were documented in previous versions of this
manual, but are now considered obsolete:
\begin{description}
\item[ni]
1998-08-07 13:02:28 -03:00
--- Import modules in ``packages.'' Basic package support is now
built in.
\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}
\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
1998-08-07 13:02:28 -03:00
arbitrary \C{} functions in arbitrary shared libraries.
\item[newmodule.c]
1998-08-07 13:02:28 -03:00
--- Tommy Burnette's \module{new} module (creates new empty objects of
certain kinds) --- dangerous.
\item[nismodule.c]
--- NIS (a.k.a. Sun's Yellow Pages) interface.
\item[stdwinmodule.c]
--- Interface to STDWIN (an old, unsupported
platform-independent GUI package). Obsolete; use Tkinter for a
platform-independent GUI instead.
1998-08-07 13:02:28 -03:00
\end{description}
The following are SGI specific:
1998-08-07 13:02:28 -03:00
\begin{description}
\item[clmodule.c]
--- Interface to the SGI compression library.
\item[svmodule.c]
--- Interface to the ``simple video'' board on SGI Indigo
(obsolete hardware).
1998-08-07 13:02:28 -03:00
\end{description}
1998-03-02 22:00:14 -04:00
The following is Windows specific:
1998-08-07 13:02:28 -03:00
\begin{description}
\item[msvcrtmodule.c]
(in directory \file{PC/}) --- define a number of Windows
1998-08-07 13:02:28 -03:00
specific goodies like \function{khbit()}, \function{getch()} and
\function{setmode()}. (Windows 95 and NT only.)
\end{description}