1 % Documentation based on module docstrings, by Fred L. Drake, Jr.
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
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
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.
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.
40 \seemodule[pycompile
]{py_compile
}{Byte-compile a single source file.
}