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?
Asked
Active
Viewed 1.2k times
9

Vince O'Sullivan
- 2,611
- 32
- 45

Kikapi
- 369
- 1
- 2
- 11
-
1Welcome to stackoverflow. Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, [describe the problem](http://meta.stackoverflow.com/questions/254393) and what has been done so far to solve it. Despite being off-topic for this site, it is a good question and I would be interested in the answers. :-) – Paulo Scardine Feb 05 '16 at 17:01
-
4At least, have a look at the newest doc. :) https://docs.python.org/3.5/library/dis.html#python-bytecode-instructions – Cilyan Feb 05 '16 at 17:04
-
The structure of .pyc files is explained here: http://nedbatchelder.com/blog/200804/the_structure_of_pyc_files.html 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). – antony Feb 05 '16 at 20:22
1 Answers
0
Python bytecode is considered an implementation detail and not officially supported or documented. Your best bet is to look at the source code of the interpreter whose bytecode you are interested in.

Antimony
- 37,781
- 10
- 100
- 107