dis
index
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/dis.py
Module Docs

Disassembler of Python byte code into mnemonics.

 
Modules
       
sys
types

 
Functions
       
dis(x=None)
Disassemble classes, methods, functions, or code.
 
With no argument, disassemble the last traceback.
disassemble(co, lasti=-1)
Disassemble a code object.
disco = disassemble(co, lasti=-1)
Disassemble a code object.
distb(tb=None)
Disassemble a traceback (default: last traceback).
findlabels(code)
Detect all offsets in a byte code which are jump targets.
 
Return the list of offsets.
findlinestarts(code)
Find the offsets in a byte code which are start of lines in the source.
 
Generate pairs (offset, lineno) as described in Python/compile.c.

 
Data
        EXTENDED_ARG = 145
HAVE_ARGUMENT = 90
__all__ = ['dis', 'disassemble', 'distb', 'disco', 'findlinestarts', 'findlabels', 'cmp_op', 'hasconst', 'hasname', 'hasjrel', 'hasjabs', 'haslocal', 'hascompare', 'hasfree', 'opname', 'opmap', 'HAVE_ARGUMENT', 'EXTENDED_ARG']
cmp_op = ('<', '<=', '==', '!=', '>', '>=', 'in', 'not in', 'is', 'is not', 'exception match', 'BAD')
hascompare = [107]
hasconst = [100]
hasfree = [135, 136, 137]
hasjabs = [111, 112, 113, 114, 115, 119]
hasjrel = [93, 110, 120, 121, 122, 143]
haslocal = [124, 125, 126]
hasname = [90, 91, 95, 96, 97, 98, 101, 106, 108, 109, 116]
opmap = {'BINARY_ADD': 23, 'BINARY_AND': 64, 'BINARY_DIVIDE': 21, 'BINARY_FLOOR_DIVIDE': 26, 'BINARY_LSHIFT': 62, 'BINARY_MODULO': 22, 'BINARY_MULTIPLY': 20, 'BINARY_OR': 66, 'BINARY_POWER': 19, 'BINARY_RSHIFT': 63, ...}
opname = ['STOP_CODE', 'POP_TOP', 'ROT_TWO', 'ROT_THREE', 'DUP_TOP', 'ROT_FOUR', '<6>', '<7>', '<8>', 'NOP', 'UNARY_POSITIVE', 'UNARY_NEGATIVE', 'UNARY_NOT', 'UNARY_CONVERT', '<14>', 'UNARY_INVERT', '<16>', '<17>', '<18>', 'BINARY_POWER', ...]