I recently managed to get python and the pygame module working on my Kobo Touch.
So I whipped up a couple of quick examples, and I put them, along with python and
pygame, in a KoboRoot.tgz file.
Here's a download link.
Install it by extracting the zip file and copying the KoboRoot.tgz file to the .kobo
folder on your Touch. Now
telnet into your Touch and run:
Code:
ln -s /mnt/onboard/.python/bin/python /usr/bin/python
To start the examples, just do:
Pressing the Kobo's home button when running an example will take you back
to the example menu. In pong, the power switch will flash the screen.
As would be expected, pygame has a couple of problems on the Kobo.
- Sometimes pygame will hang when trying to start its display. When this happens,
pressing CTRL+C seems to snap it back into action.
- The refresh rate of the e-ink is pretty bad. I know it can do better, the web browser
can display black-and-white animated GIFs quite well in partial-refresh mode.
You'll most likely want to stop the Kobo's graphical application, Nickel, before you
start the pygame examples. You can do so with:
Please note that when you want nickel to start running again, you'll have to press
the small reset button on the back of the Touch, or run the command:
How it was done
I compiled python and pygame on a virtual debian arm machine,
and I then copied python and the necessary lib*.so files to my Kobo. Quite easy.
Here are the tutorials I followed to setup a virtual debian arm machine.