meta.bytecodetools - operate on python byte-code

Python byte-code tools expands on the Python dis module.

class meta.bytecodetools.Instruction(i=-1, op=None, lineno=None)

A Python byte-code instruction.

class meta.bytecodetools.disassembler

Disassemble a code object.

Parameters:
  • co – code object
  • lasti – internal
Yields:

Instructions.

class meta.bytecodetools.ByteCodeConsumer(code)

ByteCodeVisitor

class meta.bytecodetools.StackedByteCodeConsumer(code)

A consumer with the concept of a stack.