summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libcompileall.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1998-08-11 15:46:42 (GMT)
committerFred Drake <fdrake@acm.org>1998-08-11 15:46:42 (GMT)
commite72e1e02fe67fb9a9284df09ebbc1073961c57e8 (patch)
tree5ed0a8912414622cec86e105aef253873606b7d5 /Doc/lib/libcompileall.tex
parent4756bb3e54824be3b892ff0323932fbc3fb5ec4a (diff)
downloadcpython-e72e1e02fe67fb9a9284df09ebbc1073961c57e8.zip
cpython-e72e1e02fe67fb9a9284df09ebbc1073961c57e8.tar.gz
cpython-e72e1e02fe67fb9a9284df09ebbc1073961c57e8.tar.bz2
Documentation for the compileall module.
Diffstat (limited to 'Doc/lib/libcompileall.tex')
-rw-r--r--Doc/lib/libcompileall.tex41
1 files changed, 41 insertions, 0 deletions
diff --git a/Doc/lib/libcompileall.tex b/Doc/lib/libcompileall.tex
new file mode 100644
index 0000000..64e8a9e
--- /dev/null
+++ b/Doc/lib/libcompileall.tex
@@ -0,0 +1,41 @@
+% Documentation based on module docstrings, by Fred L. Drake, Jr.
+% <fdrake@acm.org>
+
+\section{\module{compileall} ---
+ Byte-compile Python libraries.}
+
+\declaremodule{standard}{compileall}
+
+\modulesynopsis{Tools for byte-compiling all Python source files in a
+directory tree.}
+
+
+This module provides some utility functions to support installing
+Python libraries. These functions compile Python source files in a
+directory tree, allowing users without permission to write to the
+libraries to take advantage of cached byte-code files.
+
+The source file for this module may also be used as a script to
+compile Python sources in directories named on the command line or in
+\code{sys.path}.
+
+
+\begin{funcdesc}{compile_dir}{dir\optional{, maxlevels\optional{, ddir}}}
+ Recursively descend the directory tree named by \var{dir}, compiling
+ all \file{.py} files along the way. The \var{maxlevels} parameter
+ is used to limit the depth of the recursion; it defaults to
+ \code{10}. If \var{ddir} is given, it is used as the base path from
+ which the filenames used in error messages will be generated.
+\end{funcdesc}
+
+\begin{funcdesc}{compile_path}{\optional{skip_curdir\optional{, maxlevels}}}
+ Byte-compile all the \file{.py} files found along \code{sys.path}.
+ If \var{skip_curdir} is true (the default), the current directory is
+ not included in the search. The \var{maxlevels} parameter defaults
+ to \code{0} and is passed to the \function{compile_dir()} function.
+\end{funcdesc}
+
+
+\begin{seealso}
+ \seemodule[pycompile]{py_compile}{Byte-compile a single source file.}
+\end{seealso}