- TinyTurtle: A lightweight Turtle Graphics module for HP Prime
- 24 Dec 2025 05:41:11 am
- Last edited by komame on 11 Apr 2026 05:03:34 pm; edited 2 times in total
I would like to share a TinyTurtle graphics module I've written for the HP Prime. It is a lightweight implementation of the classic Python turtle module, optimized for the calculator's environment.
The module features two distinct operating modes:
There are three built-in grid types to assist with layout:
The implementation is written entirely in Python, but despite that, it performs quite reasonably well from a performance perspective (many optimizations have been applied).
A strong emphasis has been placed on compatibility with the CPython Turtle API, making it possible to run most turtle scripts available online on the HP Prime.
The most significant limitation is that only a single turtle can exist on the screen at a time. Additionally, event handling (such as ontimer, onclick, etc.) is not supported. Nevertheless, functionality directly related to graphical rendering should work reliably.
Details on unsupported features are described in the documentation.
Below are a few examples of graphics generated using this module:
Viewport mode example:
Download: http://ceme.tech/DL2776
The module features two distinct operating modes:
- Standard Mode: This is the traditional mode where drawing is performed directly on the screen in real time. It allows for control over the drawing speed, making it ideal for animations.
- Viewport Mode: In this mode, the image is first rendered at maximum speed into a back buffer (ignoring speed commands). Once rendering is complete, the final image is displayed as a whole, allowing the user to scale and pan using single key presses.
There are three built-in grid types to assist with layout:
- Dotted
- Square
- Triangular
The implementation is written entirely in Python, but despite that, it performs quite reasonably well from a performance perspective (many optimizations have been applied).
A strong emphasis has been placed on compatibility with the CPython Turtle API, making it possible to run most turtle scripts available online on the HP Prime.
The most significant limitation is that only a single turtle can exist on the screen at a time. Additionally, event handling (such as ontimer, onclick, etc.) is not supported. Nevertheless, functionality directly related to graphical rendering should work reliably.
Details on unsupported features are described in the documentation.
Below are a few examples of graphics generated using this module:
Viewport mode example:
Download: http://ceme.tech/DL2776






