将py编译成pyc

将py编译成pyc可以提高速度,并保护代码

import py_compile

py_compile.compile(r'H:/game/test.py')

原文地址:https://www.cnblogs.com/itfenqing/p/4429576.html