Playing with Python's internals

Speaker: Alex Hall

Track: Other

Type: Talk

Room: Cedarwood

Time: Oct 11 (Thu), 10:15

Duration: 1:00

This talk will look at two of my libraries which stretch the limits of what's possible with Python:

  1. birdseye, a debugger that records the value of every expression for easy viewing, and
  2. sorcery, a framework for writing magical functions which know the context in which they are called.

They work by inspecting and manipulating Python's inner workings: execution frames, code objects, and most importantly the Abstract Syntax Tree (AST). I will give an overview of these concepts and explain how some parts of the libraries work.

This is for people interested in peeking under the hood of Python from within Python, i.e. no C and no messing with the interpreter.