diff options
author | Éric Araujo <merwok@netwok.org> | 2010-12-16 06:15:02 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2010-12-16 06:15:02 (GMT) |
commit | c11ba768da100a7d7eb64cf457910a7f1655d559 (patch) | |
tree | 8627e017b5e6cae20b605d206eed62cf4391a1d3 /Doc/library | |
parent | a8132ec27efc5b1f136db38d819c7ecc389b90f4 (diff) | |
download | cpython-c11ba768da100a7d7eb64cf457910a7f1655d559.zip cpython-c11ba768da100a7d7eb64cf457910a7f1655d559.tar.gz cpython-c11ba768da100a7d7eb64cf457910a7f1655d559.tar.bz2 |
Add doc for compileall.compile_file
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/compileall.rst | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/Doc/library/compileall.rst b/Doc/library/compileall.rst index ac0feb7..d576696 100644 --- a/Doc/library/compileall.rst +++ b/Doc/library/compileall.rst @@ -1,4 +1,3 @@ - :mod:`compileall` --- Byte-compile Python libraries =================================================== @@ -50,14 +49,14 @@ compile Python sources. Expand list with its content (file and directory names). -.. versionadded:: 2.7 - The ``-i`` option. +.. versionchanged:: 2.7 + Added the ``-i`` option. Public functions ---------------- -.. function:: compile_dir(dir[, maxlevels[, ddir[, force[, rx[, quiet]]]]]) +.. function:: compile_dir(dir[, maxlevels[, ddir[, force[, rx[, quiet]]]]]) Recursively descend the directory tree named by *dir*, compiling all :file:`.py` files along the way. The *maxlevels* parameter is used to limit the depth of @@ -72,6 +71,23 @@ Public functions If *quiet* is true, nothing is printed to the standard output in normal operation. + +.. function:: compile_file(fullname[, ddir[, force[, rx[, quiet]]]]) + + Compile the file with path *fullname*. If *ddir* is given, it is used as the + base path from which the filename used in error messages will be generated. + If *force* is true, modules are re-compiled even if the timestamp is up to + date. + + If *rx* is given, it specifies a regular expression which, if matched, will + prevent compilation; that expression is searched for in the full path. + + If *quiet* is true, nothing is printed to the standard output in normal + operation. + + .. versionadded:: 2.7 + + .. function:: compile_path([skip_curdir[, maxlevels[, force]]]) Byte-compile all the :file:`.py` files found along ``sys.path``. If |