把一个py文件编译为pyc文件了。(假设在windows环境下)
import py_compile
py_compile.compile(r'H:\game\test.py')
py_compile.compile('webmail_sina.py') # Linux环境

批量生成pyc文件
>>> import compileall
>>> compileall.compile_dir(r'/home/codemo/Desktop/python')

相关文章:

  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
  • 2021-09-07
  • 2021-11-28
  • 2021-10-04
猜你喜欢
  • 2021-11-16
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案