Linux Commands Examples

A great documentation place for Linux commands

pycompile

byte compile Python source files

Synopsis

pycompile [-V [X.Y][-][A.B]] DIR_OR_FILE [-X REGEXPR]

pycompile -p PACKAGE


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
source
            
if which pycompile >/dev/null 2>&1; then
pycompile -p #PACKAGE# #ARGS#
fi

description

Wrapper around Python standard library's py_compile module to byte-compile Python files.

options

--version

show program's version number and exit

-h, --help

show this help message and exit

-f, --force

force rebuild of byte-code files even if timestamps are up-to-date

-O

byte-compile to .pyo files

-q, --quiet

be quiet

-v, --verbose

turn verbose mode on

-p PACKAGE, --package=PACKAGE

specify Debian package name whose files should be bytecompiled

-V VRANGE

force private modules to be bytecompiled with Python version from given range, regardless of the default Python version in the system. If there are no other options, bytecompile all public modules for installed Python versions that match given range. VERSION_RANGE examples:

2.5 version 2.5 only

2.5- version 2.5 or newer

2.5-2.7 version 2.5 or 2.6

-3.0 all supported 2.X versions

-X REGEXPR, --exclude=REGEXPR

exclude items that match given REGEXPR. You may use this option multiple times to build up a list of things to exclude

How can this site be more helpful to YOU ?


give  feedback