Python Ipaq

Why?

Python makes it extremely easy to write fairly complex programs quickly. It has clean, easy to read, syntax, a very complete standard library (files, sockets, regular expressions, win32 functions, etc.) and efficient.

It's ideal as a glue to deal with the main logic of a program, while time-critial subroutines are written in C. Extending Python in this way is very easily done. Python programs are portable to just about every available platform without changing the source. It's also easy to build sophisticated (and portable) GUI's very quickly using the standard TkInter package.

Python basics

Some guides on picking up Python:

Building GUI's

It's very easy to build GUI's with Python using TkInter (which comes with Python). See BuildingTkInterfaces for more details.

Extensions

It's very easy to extend Python with C/C++ (in fact, that's what Python's often used for -- gluing together bits of C code). There are full details for doing this on the iPaq at ExtendingPython.

Installing Python

Get python-pocketpc-2003.zip or python-pocketpc-2002.zip, as appropriate, and tkinter.zip. Expand the python-xxx.zip file into \program files\python\lib.

You need to copy the files inside the tkinter.zip directory tcl8.3 into \program files\python (they should be library and tk8.4). Copy the windows directory over the \windows directory on the device.

NB You need to include the following line at the top of iPaq tkinter programs to get them to work:

import sys
sys.path.append('\\Program Files\\Python\\Lib\\python23.zip\\lib-tk')

Setting up the registry

Put setup-registry.lnk and setup-registry.py in \program files\python\lib if they are not already there.

Open setup-registry.lnk from the file explorer -- now double clicking .py files should open them.

Python interpreter server

If you put server.py in \program files\python\lib and then run it, you can telnet in on port 8653 and use the interactive intepreter remotely. If you're using putty (recommended), set "Implict CR with each LF" in the "Terminal" page.

SDL and PyGame

soon...

Dynamics and Interaction Extensions

A number of special extensions are being implemented for use within the group. These include XSens access, vibrator control, MESH access, sound and speech synthesis, GapiDraw, OpenGL, matrix libraries, Gaussian Process code and simple neural networking code. See DiPythonExtensions for current status.

last edited 27.02.2005 21:50:56 by John Williamson