The downside of using Python on the Zaurus is that Python is big! We're talking 30+ MiB for a relatively complete Python installation. It is possible to chop that up into different packages and install only the minimum necessary for the app(s) you want to run (as the excellent Python for arm-linux project has done). However, Python developers aren't used to restricting themselves to just a small set of Python functions so to support a large interactive Python application, you'll end up with most of the Python packages installed. Another problem with the Python for arm-linux stuff is that the packages compatible with a standard Sharp ROM are a bit incomplete and outdated.
To make matters worse, on a Sharp or Sharp-compatible ROM, you need to install the Python packages into internal memory or an ext2/ext3 formatted memory card for everything to work properly. Sacrificing 30+ MiB of internal memory is tough for SL-C7X0/SL-C860/SL-6000 owners and it's virtually impossible for other less memory endowed Zaurus models. And reformatting your memory card to ext2/ext3 makes it unusable in a lot of other devices.
To deal with these problems, I've come up with a a compressed "image" of a relatively complete Zaurus Python installation that you can actually use directly from a FAT formatted memory card (SD or CF)! Through the magic of Linux loop devices, you can trick the Zaurus into thinking the whole thing is installed to internal memory. Since the "image" itself contains a complete Linux ext2 filesystem, you can use it on SD or CF cards that are formatted FAT16 or FAT32. The whole Python tree will appear as just a (large) single file on your memory card.
The Python Zaurus Image and the Python Zaurus IPK are a matched set. Upgrading one will generally require upgrading the other. When upgrading, you must always complete the following steps in the order listed:
python-exe
.
python24.img
or python24.ex2
file to the Zaurus.
python-exe
package.
See the Installation instructions below for details on performing the last two steps.
You'll need to download two packages from the downloads page - The Python Zaurus Image and the Python Zaurus IPK. Once you have both packages, follow these steps:
python24.img
or python24.ex2
file. Make sure you put the file in the correct location!
python24.img
you must copy it to the root directory of an SD card or to the Zaurus' "Main_Memory" (/home/zaurus/Documents). Note that the file will take up about 9 MiB of space. The file should not be installed to a CF card or hard disk!.
python24.ex2.gz
you must first uncompress it (turning it into python24.ex2
) then copy the uncompressed file to one of the following locations (note that the file will take up about 48 MiB of space):
python-exe_2.4.0-1_arm.ipk
file to any location on your Zaurus that will allow the Add/Remove Software utility to find it (CF or SD card or /home/zaurus/Documents in internal memory).
python-exe
to internal memory. Don't worry, this is not the complete Python image ... just the 1.2 MiB executable and some scripts. You must install the python-exe package to internal memory -- it will not work from SD or CF!
su
), and issue the command /etc/rc.d/init.d/mntpython start
python
from a shell prompt and you should get a Python interpreter prompt.
print "hello, world!"
and you should see the text "hello, world!" printed.
CTRL-D
(on non-clamshell Zaurus that's Fn-Shift-D
) to exit the Python interpreter.
Please follow the instructions above carefully. We've tried hard to make this installation process as simple as possible, but there are still plenty of places to make mistakes.
Coming soon.
to top
Project hosting provided by: | Donations welcome:![]() |