#!/bin/sh # $Id: optimize,v 1.1.1.1 2000/05/12 14:59:35 dagb Exp $ /usr/bin/env python -O -c " import sys, os, string, py_compile files = '''$*''' print 'Byte-compiling optimized python files...' for file in string.split(files): path = file if not os.path.exists(path) or not (len(path) >= 3 and path[-3:] == '.py'): continue print file, sys.stdout.flush() py_compile.compile(path) print" 2>/dev/null || :