Commit 35f64c12 authored by Andrew M. Kuchling's avatar Andrew M. Kuchling

Add example

parent 53912160
......@@ -44,6 +44,19 @@ compile Python sources in directories named on the command line or in
\function{compile_dir()} function.
\end{funcdesc}
To force a recompile of all the \file{.py} files in the \file{Lib/}
subdirectory and all its subdirectories:
\begin{verbatim}
import compileall
compileall.compile_dir('Lib/', force=True)
# Perform same compilation, excluding files in .svn directories.
import re
compileall.compile_dir('Lib/', rx=re.compile('/[.]svn'), force=True)
\end{verbatim}
\begin{seealso}
\seemodule[pycompile]{py_compile}{Byte-compile a single source file.}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment