Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Amaze your friends by running Python doctests in a fake interactive shell

Project Description

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.


Run playerpiano <options> <FILE>, where FILE is a file containing doctests or the name of a module. Do not pass 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.


The --color option will syntax-highlight source lines. It is currently hard-coded for a black background terminal.

The --no-terminal option will disable output on the main terminal. This is less than useful at present.

The --fifo option takes the name of a fifo to duplicate output to. After starting playerpiano with this option, you must run cat name_of_fifo in another terminal before any output will be displayed. This is useful when presenting using a projector. Start a second xterm & run cat, then put it on the overhead (with the main terminal on your laptop). This allows you to see what you’re doing.

Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
PlayerPiano-0.2.0.tar.gz (7.2 kB) Copy SHA256 Checksum SHA256 Source Mar 2, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting