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

See the PlayerPiano PyPI page for more info, or this blog post for a demo.

playerpiano plays back a recorded shell session in a terminal.

recorderpiano can be used to record a shell session for later playback.

Usage

Run playerpiano <options> <FILE> , where FILE is a file containing doctests or the name of a module. Do not pass mymodule.py directly, it will confuse the doctest parser. Use mymodule instead.

Pressing any keys will type source lines, stop at the end of each source block.

Press enter to show the results block.

EOF (^D) will exit the program at the end.

Break (^C) will interrrupt the program immediately.