Skip to content

Desktop CPython

Who: You develop on Linux, macOS, or Windows with CPython and want a local display window.

Prerequisites: Python 3, git. See CPython desktop platform guide for OS-specific SDL2/PyGame setup.

Dependencies

Install SDL2 development libraries for your OS, or use PyGame (PGDisplay) — details in platforms/cpython-desktop.md.

First run

Default config uses SDL2Display (src/lib/board_config.py).

PyGame fallback

If SDL2 fails (common on Windows):

pip install pygame
cp board_configs/pgdisplay/board_config.py src/lib/board_config.py
cd pydisplay/src
python3 -i path.py

Input on desktop

Mouse events map to touch events. Same event API as on embedded targets.

Next

Reference