Ditched '_find_SET()', since it was a no-value-added wrapper around
[python/dscho.git] / Doc / lib / libcompileall.tex
blob64e8a9e623c44ce5487e06dea80ca5c978dcdfea
1 % Documentation based on module docstrings, by Fred L. Drake, Jr.
2 % <fdrake@acm.org>
4 \section{\module{compileall} ---
5 Byte-compile Python libraries.}
7 \declaremodule{standard}{compileall}
9 \modulesynopsis{Tools for byte-compiling all Python source files in a
10 directory tree.}
13 This module provides some utility functions to support installing
14 Python libraries. These functions compile Python source files in a
15 directory tree, allowing users without permission to write to the
16 libraries to take advantage of cached byte-code files.
18 The source file for this module may also be used as a script to
19 compile Python sources in directories named on the command line or in
20 \code{sys.path}.
23 \begin{funcdesc}{compile_dir}{dir\optional{, maxlevels\optional{, ddir}}}
24 Recursively descend the directory tree named by \var{dir}, compiling
25 all \file{.py} files along the way. The \var{maxlevels} parameter
26 is used to limit the depth of the recursion; it defaults to
27 \code{10}. If \var{ddir} is given, it is used as the base path from
28 which the filenames used in error messages will be generated.
29 \end{funcdesc}
31 \begin{funcdesc}{compile_path}{\optional{skip_curdir\optional{, maxlevels}}}
32 Byte-compile all the \file{.py} files found along \code{sys.path}.
33 If \var{skip_curdir} is true (the default), the current directory is
34 not included in the search. The \var{maxlevels} parameter defaults
35 to \code{0} and is passed to the \function{compile_dir()} function.
36 \end{funcdesc}
39 \begin{seealso}
40 \seemodule[pycompile]{py_compile}{Byte-compile a single source file.}
41 \end{seealso}