summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
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)
commitc11ba768da100a7d7eb64cf457910a7f1655d559 (patch)
tree8627e017b5e6cae20b605d206eed62cf4391a1d3 /Lib
parenta8132ec27efc5b1f136db38d819c7ecc389b90f4 (diff)
downloadcpython-c11ba768da100a7d7eb64cf457910a7f1655d559.zip
cpython-c11ba768da100a7d7eb64cf457910a7f1655d559.tar.gz
cpython-c11ba768da100a7d7eb64cf457910a7f1655d559.tar.bz2
Add doc for compileall.compile_file
Diffstat (limited to 'Lib')
-rw-r--r--Lib/compileall.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/Lib/compileall.py b/Lib/compileall.py
index f564abb..910f305 100644
--- a/Lib/compileall.py
+++ b/Lib/compileall.py
@@ -9,7 +9,6 @@ recursing into subdirectories. (Even though it should do so for
packages -- for now, you'll have to deal with packages separately.)
See module py_compile for details of the actual byte-compilation.
-
"""
import os
import sys
@@ -31,7 +30,6 @@ def compile_dir(dir, maxlevels=10, ddir=None,
directory name that will show up in error messages)
force: if 1, force compilation, even if timestamps are up-to-date
quiet: if 1, be quiet during compilation
-
"""
if not quiet:
print 'Listing', dir, '...'
@@ -61,15 +59,16 @@ def compile_dir(dir, maxlevels=10, ddir=None,
return success
def compile_file(fullname, ddir=None, force=0, rx=None, quiet=0):
- """Byte-compile file.
- file: the file to byte-compile
+ """Byte-compile one file.
+
+ Arguments (only fullname is required):
+
+ fullname: the file to byte-compile
ddir: if given, purported directory name (this is the
directory name that will show up in error messages)
force: if 1, force compilation, even if timestamps are up-to-date
quiet: if 1, be quiet during compilation
-
"""
-
success = 1
name = os.path.basename(fullname)
if ddir is not None:
@@ -120,7 +119,6 @@ def compile_path(skip_curdir=1, maxlevels=0, force=0, quiet=0):
maxlevels: max recursion level (default 0)
force: as for compile_dir() (default 0)
quiet: as for compile_dir() (default 0)
-
"""
success = 1
for dir in sys.path: