how to improve simple python shell script (to compile list of files)

Fredrik Lundh fredrik at pythonware.com
Sat Oct 15 07:38:22 EDT 2005


Jari Aalto wrote:

> Please suggest comments how can I make this script to work
> from bash.

replace it with a call to the compileall module?

    $ python -mcompileall [directory...]

?

    $ python -mcompileall -h
    option -h not recognized
    usage: python compileall.py [-l] [-f] [-q] [-d destdir] [-x regexp] [directory ...]
    -l: don't recurse down
    -f: force rebuild even if timestamps are up-to-date
    -q: quiet operation
    -d destdir: purported directory name for error messages
       if no directory arguments, -l sys.path is assumed
    -x regexp: skip files matching the regular expression regexp
       the regexp is search for in the full path of the file

</F>






More information about the Python-list mailing list