Website hosting service by Active-Venture.com
  

 Back to Index

18.9 compileall -- Byte-compile Python libraries

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 sys.path.

 
compile_dir( dir[, maxlevels[, ddir[, force[, rx[, quiet]]]]])
Recursively descend the directory tree named by dir, compiling all .py files along the way. The maxlevels parameter is used to limit the depth of the recursion; it defaults to 10. If ddir is given, it is used as the base path from which the filenames used in error messages will be generated. If force is true, modules are re-compiled even if the timestamps are up to date.

If rx is given, it specifies a regular expression of file names to exclude from the search; that expression is searched for in the full path.

If quiet is true, nothing is printed to the standard output in normal operation.

 
compile_path( [skip_curdir[, maxlevels[, force]]])
Byte-compile all the .py files found along sys.path. If skip_curdir is true (the default), the current directory is not included in the search. The maxlevels and force parameters default to 0 and are passed to the compile_dir() function.

See Also:

Module py_compile:
Byte-compile a single source file.

  

 

2002-2004 Active-Venture.com Webhosting Service

 

Disclaimer: This documentation is provided only for the benefits of our hosting customers.
For authoritative source of the documentation, please refer to http://python.org/doc/

 

Cheap domain registrar provides cheap domain registration, buy domain name and domain transfer from $5.95/year only   Cheap domain registration : Buy domain name and enjoy comprehensive free services