Skip to main content

PlayerPiano

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.

Options

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

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.

Metadata

Release files for PlayerPiano 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PlayerPiano 0.3.0
File Size Uploaded
PlayerPiano-0.3.0.tar.gz 10.2 kB Details

Release files / PlayerPiano-0.3.0.tar.gz

Download URL PlayerPiano-0.3.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9971705e61109e90c96ab4bb9272c85021ce033f8399856308b115d73eb3892f
BLAKE2b-256 checksum
How to use checksums
5ae81368da6a873ff5c06f2a065ddcdac195b03a2839d17c0489878ce82c9b96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3.0 This release

1 release file

0.2.0

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page