如何用Python2.7重新编译Python2.5生成的一些.pyc文件?我没有源文件,无法获取。我正在寻找一个免费的解决方案。 最佳答案 您需要安装Python2.5和2.7以及byteplay(http://code.google.com/p/byteplay/)。diz.py:#!/usr/bin/envpythonimportbyteplay,marshal,sysif__name__=='__main__':sys.stdin.read(8)c=byteplay.Code.from_code(marshal.load(sy