一、将python文件编译成pyc和pyo文件
用
python -m py_compile file.py
python -m py_compile /root/src/{file1,file2}.py
编译成pyc文件。
也可以写份脚本来做这事:
Code:
import py_compile py_compile.compile('path') //path是包括.py文件名的路 |
一、将python文件编译成pyc和pyo文件
用
python -m py_compile file.py
python -m py_compile /root/src/{file1,file2}.py
编译成pyc文件。
也可以写份脚本来做这事:
Code:
import py_compile py_compile.compile('path') //path是包括.py文件名的路 |