A.5 Obsolete

#
A.5 Obsolete

These modules are not normally available for import; additional work must be done to make them available.

Those which are written in Python will be installed into the directory lib-old/ installed as part of the standard library. To use these, the directory must be added to `sys.path`, possibly using PYTHONPATH.

Obsolete extension modules written in C are not built by default. Under Unix, these must be enabled by uncommenting the appropriate lines in Modules/Setup in the build tree and either rebuilding Python if the modules are statically linked, or building and installing the shared object if using dynamically-loaded extensions.

`addpack`
  -- Alternate approach to packages. Use the built-in package support instead.

`cmp`
  -- File comparison function. Use the newer `filecmp` instead.

`cmpcache`
  -- Caching version of the obsolete `cmp` module. Use the newer `filecmp` instead.

`codehack`
  -- 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`).

`dircmp`
  -- Class to build directory diff tools on (may become a demo or tool).
  Deprecated since release 2.0. The `filecmp` module replaces `dircmp`.

`dump`
  -- Print python code that reconstructs a variable.

`fmt`
  -- Text formatting abstractions (too slow).

`lockfile`
  -- Wrapper around FCNTL file locking (use `fcntl.lockf()`/`flock()` instead; see `fcntl`).

`newdir`
  -- New `dir()` function (the standard `dir()` is now just as good).

`Para`
  -- Helper for `fmt`.

`poly`
  -- Polynomials.

`regex`
  -- Emacs-style regular expression support; may still be used in some old code (extension module). Refer to the Python 1.6 Documentation for documentation.

`regsub`
  -- Regular expression based string replacement utilities, for use with `regex` (extension module). Refer to the Python 1.6 Documentation for documentation.

`tb`
  -- Print tracebacks, with a dump of local variables (use `pdb.pm()` or `traceback` instead).

`timing`
  -- Measure time intervals to high resolution (use `time.clock()` instead). (This is an extension module.)

`tzparse`
  -- Parse a timezone specification (unfinished; may disappear in the future, and does not work when the TZ environment variable is not set).

`util`
  -- Useful functions that don't fit elsewhere.

`whatsound`
  -- Recognize sound files; use `sndhdr` instead.

`zmod`
  -- Compute properties of mathematical ``fields.''

The following modules are obsolete, but are likely to re-surface as tools or scripts:

`find`
  -- Find files matching pattern in directory tree.

`grep`
  -- grep implementation in Python.

`packmail`
  -- Create a self-unpacking Unix shell archive.

The following modules were documented in previous versions of this manual, but are now considered obsolete. The source for the documentation is still available as part of the documentation source archive.

`ni`
  -- Import modules in ``packages.'' Basic package support is now built in. The built-in support is very similar to what is provided in this module.

`rand`
  -- Old interface to the random number generator.