File: compiledir.in

package info (click to toggle)
epylog 1.0.3-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 708 kB
  • ctags: 326
  • sloc: python: 4,418; sh: 2,913; makefile: 493; perl: 194; xml: 78
file content (12 lines) | stat: -rw-r--r-- 316 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
#!@PYTHON_BIN@ -tt
import sys, os.path
from compileall import compile_dir

if __name__ == '__main__':
    if len(sys.argv) < 2: sys.exit(0)
    dirs = sys.argv[1:]
    for d in dirs:
        if not os.path.isdir(d):
            print '%s is not a dir. Throwing away.' % d
            continue
        compile_dir(d)