Out of curiosity I would like to see the assembly instructions that correspond to the code of a .py file. Are there any trustworthy solutions you can propose?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
The
dis
module disassembles code objects (extracting those from functions, classes and objects with a__dict__
namespace).This means you can use it to disassemble whole modules:
although this isn't nearly as interesting as you may think as most modules contain several functions and classes, leading to a lot of output.
I usually focus on smaller functions with specific aspects I am interested in; like what bytecode is generated for a chained comparison:
for example.