Skip to topic | Skip to bottom
Home
Main
Main.PythonZaurusImager1.1 - 08 Nov 2004 - 20:08 - DavidKesslertopic end

Start of topic | Skip to actions

Python Zaurus Image

Background

Python is an excellent "environment" for creating Zaurus applications. With it's bindings to the Qtopia user interface (PyQt) it's possible to greate native graphical Zaurus applications quite easily. And because there's no compilation step with Python apps, you can develop on a Windows, Linux, or Mac desktop without the hassle of setting up a cross-development environment. You can even develop directly on the Zaurus! In fact, the first version of PyqPlayer has been developed entirely on the Zaurus.

The downside of using Python on the Zaurus is that Python 2.3 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 (as the excellent [[][Python on Zaurus]] project has done). However, one of Python's greatest strengths is it's rich set of run-time libraries, and most Python developers are not hesitant to use a broad range of Python features. It's almost inevitable that to support a significant interactive Python application, you'll end up with most of the Python packages installed.

To make matters worse, on a Sharp or Sharp-compatible ROM, you need to install Python into internal memory for everything to work properly (or you need to spend a lot of time manually creating symbolic links to a Python tree on a memory card). 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.

What I've come up with is a 50 MiB "image" of a relatively complete Zaurus Python installation that you can actually use directly from a 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. What's even better is that since this "image" 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.

Installation

You'll need to download two packages from the downloads page - The Python Zaurus Image and the Python Zaurus Executable. Once you have both packages, follow these steps:

  1. Gunzip the python23.img.gz file (it's best to do this on your PC) and copy the resulting python23.img file to the root directory of a CF or SD card. Note that the file will take up about 50 MiB of space on your memory card so you'll need at least a 64 MB card for this. Make sure you put python23.img in the card's root directory!
  2. Copy the python_exe.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).
  3. Run the Add/Remove Software utility and use it to install python_exe to internal memory. You must install the python_exe package to internal memory -- it will not work from SD or CF!
  4. When the installation is complete, exit the Add/Remove Software program and then use the Reboot application to do a full reboot of your Zaurus.
    • If you wish to avoid the reboot, you can go to a shell prompt (console), log in as root (su), and issue the command /etc/rc.d/init.d/mntpython start
  5. Test your Python installation.
    1. Simply run python from a shell prompt and you should get a Python interpreter prompt.
    2. Enter the command print "hello, world!" and you should see the text "hello, world!" printed.
    3. Type CTRL-D to exit the Python interpreter.

How it Works

Coming soon.

-- DavidKessler - 08 Nov 2004
to top


You are here: Main > WebLeftBar > PyqPlayerDownload > PythonZaurusImage

to top

Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Project hosting provided by:
SourceForge.net Logo
Donations welcome:
Support This Project