_ .-. .-.
_;:: : :

.---. .-.: : .---. .--. : : : .; : :: :_ : .; `' .; ; : :_ : ._.':_;.__;: ._.'.__,_;.__; : : : : :_; :_;

version 1.2.0


pilpal can be used to get instant visual feedback from scripts that generate image and are based on Python Imaging Library (PIL).


  • Create a script which outputs an image (for example test.py)

    Note: Creating a script in advance is not necessary as of

    version 1.0.1 because pilpal will create a template script if the source file does not exist yet

  • Invoke pilpal like so:

    pilpal test.py

  • pilpal will display the image (in this case test.png by default)

  • If you change and save your code again the displayed image will be updated

    Note: As of 1.1.0 you can press the 'r' key to refresh the display if the

    image window has focus

  • If your program outputs an image with a different filename, use the -o switch to specify that filename, for example:

    pilpal.py -o output.jpg test.py

Command-line help

usage: pilpal [-h] [-o OUTPUT_FILE] [-y] [-s] [-k] [-v] input_file

Quick and simple graphics programming.

positional arguments:
input_file python source file
optional arguments:
-h, --help show this help message and exit
 defaults to the basename of the source file with .png extension
-y, --yes automatically create a new file if source file does not exist
-c, --create create the given source file and exit
-s, --silent disable update messages
-k, --key-help list available keyboard shortcuts and exit
-v, --version show program's version number and exit

Keyboard shortcuts

These shortcut keys are available when the display window has focus:

<F5> Updates the display window. <F3> Saves current output as a unique image. <F2> Shows information about the current image. <F1> Displays keyboard help. <F10> Closes the display window and the running script.


pilpal depends on Python Imaging Library (PIL). On Ubuntu/Debian linux you can install the required packages using the following commands:

sudo apt-get install python-imaging sudo apt-get install python-imaging-tk

You can find the documentation for PIL here:



pilpal is licensed under GPLv3, see the COPYING file for details.


Károly Kiripolszky <karcsi@ekezet.com>