Introduction to Python
PythonExtra is a custom Python runtime made for ClassPad calculators, built on top of the gint kernel.
It lets you build games, utilities, and animations using pure Python, while accessing low-level screen rendering, key input, and more — all optimized for performance.
If you’re just getting started, no setup is needed.
Just open your Codespace or use your favorite editor and you’re ready to write Python code that runs directly on your calculator!
Instant start with Codespaces
The fastest way to start using PythonExtra is with our pre-configured GitHub Codespace.
You don’t need to install anything locally — just open a project in the browser and start coding:
Need Help While Coding?
Stuck on something? Don’t worry — you don’t have to figure it all out alone.
You can ask help directly to the
👉 👨💻 PythonExtra ChatGPT
If you’re old school, you can also ask
💬 on the ClassPad Club
Beginner Tutorials
These tutorials will walk you through the essentials of PythonExtra — from printing your first message to creating animated programs.
Step 1: Drawing Your First Rectangle
Learn how to:
- Draw a custom logo made of text
- Move it across the screen
- Bounce it off screen borders
- Exit the program on key press
Step 2: Drawing and Colors
Learn to draw colored shapes, fill the screen, and use screen coordinates with precision. Perfect for starting any visual project.
Step 3: Handling Input
In this tutorial, you’ll make a simple game where you move a shape around with the keyboard. It covers real-time input with pollevent()
and keydown()
.
Step 4: Bouncing Logo
Learn how to:
- Draw a custom logo made of text
- Move it across the screen
- Bounce it off screen borders
- Exit the program on key press
Step 5: Snake ? Snaaake !
Put everything you learnt in practice with the classical “Snake” game
Step 6: Drawing Images
Use tools like fxconv
to convert real images into Python data and draw them on screen.
What’s next?
If you’re comfortable with drawing, input, and animation, try combining them into your own game or app. PythonExtra is capable of running surprisingly complex things — and you can always peek at sample projects like:
Technical Documentation
Want to dive into the internals and low-level functions?
Check out the full technical documentation
(also available in french for some reason 🇫🇷)
There’s also casioplot module. Not really great for games, but might be useful in other contexts!
Try Drawing Code Online
Want to quickly test simple drawing code (like gint.drect
, gint.dpixel
, gint.dcircle
, etc.)?
You can use the PythonExtra REPL (beta) here:
🌐 python-extra-repl
⚠️ This REPL only supports drawing commands.
Functions like gint.getkey()
or gint.pollevent()
won’t work.
Avoid infinite loops like while True:
. You’ve been warned.
All the Examples
Want more sample code?
All examples can be found here:
🔗 https://git.planet-casio.com/Lephenixnoir/PythonExtra/src/branch/main/ports/sh/examples
⚠️ Note: some of these aren’t tailored specifically for the ClassPad, so you might need to tweak them.