This is awesome! I'm wondering what you used to lay out the code, while keeping track of which part of it has the mouse over the top? For instance, pprint will just give you a string back.
Thanks, I actually don't have a general solution for doing this. The code in the slide is specified with markup, so the usual events apply for detecting mouseover.