<<O>>  Difference Topic PythonZaurusImage (r1.3 - 16 Jan 2005 - DavidKessler)

META TOPICPARENT PyqPlayerDownload
Changed:
<
<

Python Zaurus Image

>
>

Zaurus Python 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.
 <<O>>  Difference Topic PythonZaurusImage (r1.2 - 10 Nov 2004 - DavidKessler)

META TOPICPARENT PyqPlayerDownload

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.
Changed:
<
<
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.
>
>
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.

Changed:
<
<
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.
>
>
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.

Changed:
<
<
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.
>
>
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.

Upgrading

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:

  1. Use the Add/Remove Software utility on the Zaurus to uninstall python-exe.
  2. Copy the python24.img or python24.ex2 file to the Zaurus.
  3. Use the Add/Remove Software utility on the Zaurus to install the new python-exe package.

See the Installation instructions below for details on performing the last two steps.


Installation

Changed:
<
<
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:
>
>
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:

Changed:
<
<
  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!
>
>
  1. Install the python24.img or python24.ex2 file. Make sure you put the file in the correct location!
    • If you're using 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!.
    • If you're using 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):
      • the root directory of a CF or SD card
      • the Zaurus' "Main_Memory" (/home/zaurus/Documents)
      • the root directory of one of the Zaurus SL-3000 hard disk partitions
  2. Copy the 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).
  3. Run the Add/Remove Software utility and use it to install 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!

  1. 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
  2. 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.
Changed:
<
<
    1. Type CTRL-D to exit the Python interpreter.
>
>
    1. Type 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.


How it Works

Coming soon.

Deleted:
<
<
-- DavidKessler - 08 Nov 2004
 <<O>>  Difference Topic PythonZaurusImage (r1.1 - 08 Nov 2004 - DavidKessler)
Line: 1 to 1
Added:
>
>
META TOPICPARENT PyqPlayerDownload

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

View topic | Diffs | r1.3 | > | r1.2 | > | r1.1 | More
Revision r1.1 - 08 Nov 2004 - 20:08 - DavidKessler
Revision r1.3 - 16 Jan 2005 - 20:11 - DavidKessler