|
|
Programming in Python on the iPAQ
Setting Python up on the iPAQ
The following has been tested and installed with the v0.16 images.
First you need to get Python installed on your iPAQ. I have compiled python, libglade, libxml and pygtk. You can find both a /usr/local crams image and the binary sources I used to create the image from ftp://ftp.handhelds.org/pub/apps/arm/python. These files were configured and compiled on the handhelds.org skiffclusters.
If you are not using /usr/local (/dev/flash6) for anything you can load my prepared usr.local-python.cramfs image onto your ipaq. /dev/flash6 is not used by the standard ipaq images released on handhelds.org. You can install usr.local-python.cramfs on your iPAQ in one of two ways:
From the bootloader
1. boot> load flash 0xd00000
2. use you terminal program to upload the usr.local-python.cramfs file.
3. boot> boot
From your iPAQ running Linux
1. Use your favorite terminal program to login as root.
2. cd /home/guest
3. run 'rz'
4. Start a zmodem upload of the usr.local-python.cramfs file.
5. run 'dd if=usr.local-python.cramfs of=/dev/flash6'
(NOTE: Don't try this unless you have the latest bootloader installed
6. rm usr.local-python.cramfs (to clean up)
7. And, when working with flash always, always sync after. So run 'sync'. Heck, do it twice.
Now that python is installed in /dev/flash6 you need to mount it on /usr/local. To do this run 'mount -t cramfs /dev/flash6 /usr/local'.
To be able to run python with the gtk bindings you also need to add /usr/local/lib to your /etc/ld.so.conf file by running 'echo /usr/local/lib >> /etc/ld.so.conf; /sbin/ldconfig'. Note that these changes will be lost unless you add the line to your cramfs image and re-flash. More information on working with cramfs images can be found here. These changes should be incorporated into the 2-49 images (part of v0.17) and later.
TODO:
* Add sample reference python-gtk programs. If you want to play for now, use the ones from the dedault install of pygtk.This is available from: http://www.daa.com.au/~james/pygtk/
* Some sample glade/python/gtk packages.
* Add some instructions on incorporating the python/library builds into user images.
* Incorporate user feedback. I'm sure there will be a LOT... :-)
* Write some useful programs!!!
Modified October 10, 2000 by [email protected]
|
|
|