PlayerPiano amazes your friends by running Python doctests in a fake interactive shell.

This is one of my favorite pieces of code - an app for developers, by a developer. I think it really shows off the potential of computers as a tool for human communication (mostly unfulfilled, IMO). The basic idea belongs to Ian Bicking (if you haven’t seen his “Topics of Interest” talk, go watch it. Now). I realized I could use doctest to extract the code samples, making for a much more usable tool.


Being a tool for demonstration, the best explanation is a demo. Here’s my 2009 Pycon lightning talk on the subject. And yes, my hands were shaking quite a lot (two cups of coffee immediately before presenting to 1000+ people was probably not the best idea).

Ironically, our talks about code often feature remarkably little actual code. Live typing is slow, difficult and boring for an audience. PlayerPiano makes demoing code easier, by scaling Python’s shell culture up to the ballroom. With PlayerPiano, your presentations can be interactive demos with vocal explanations, leaving your slides to summarize for an audience that’s already on the web. I hope it’s helpful to speakers at next year’s Pycon or at your local user group.

Pittsburgh, US
Twitter | LinkedIn