I work on win system, and I wonder a way that I can use a python script which could run in cmd lines to mass compile the py files.
I have write a simple python code.
import py_compile, os, glob
dir = 'D:\\FAS\\config'
for f in glob.glob(dir + '\\*.py'):
py_compile.compile(f)
print "Success compile the file: %s" % f
It work inconveniently and can not compile the file in the folder’s sub-folder. I hope your help.
1 Answer