Python字节码和.pyc文件格式规范 [英] Python bytecode and .pyc file format specification
问题描述
我正在寻找pyc文件格式规范。我发现了这个链接,它提供了不带操作码的字节码指令,但是我需要更详细的文件,其中包括 .pyc
的文件结构。有人可以给我提供链接吗?
I'm looking for pyc file format specification. I found this link that provides bytecode instructions without the opcodes but I need a lot more detailed file that includes the file structure of the .pyc
. Can anyone provide me a link to it?
推荐答案
.pyc文件的结构在此处说明: http://nedbatchelder.com/blog/200804/the_structure_of_pyc_files.html
The structure of .pyc files is explained here: http://nedbatchelder.com/blog/200804/the_structure_of_pyc_files.html
Cilyan已经在标准库中发布了指向字节码实际文档的链接( https://docs.python.org/3.5/library/dis.html#python-bytecode-instructions )。
Cilyan already posted a link to the actual documentation for the bytecodes in the standard library (https://docs.python.org/3.5/library/dis.html#python-bytecode-instructions).
这篇关于Python字节码和.pyc文件格式规范的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!