Python CE: Programming in Python on

Windows CE Based Devices

 

Jeff Bauer

Rubicon, Inc.

 

 

 

Abstract

 

Python CE is an implementation of the Python Programming Language for Windows CE based devices. The code has been written and is currently maintained by Brian Lloyd of Digital Creations, Inc.

 

The minimum requirements to run Python CE are an HPC running Windows CE 1.0 or higher on a SH3 or MIPS processor. A minimum of 4MB is required, but 8MB is recommended to do anything useful. The footprint is approximately 500KB, and the interpreter can be run entirely from a flash card.

 

Second generation Windows CE devices are routinely appearing with 16MB, running CE 2.0. Although not up to workstation standards, this represents a significant advance in resources available to Python CE, as applications can move beyond the "toy" stage. Some users have reported success in using Python CE with Palm PC (PPC) devices.

 

Python CE is released as a small .EXE file, a larger .DLL file (occupying about 1MB when in use), a subset of the standard Python libraries, and a few extensions for various Win32 API's. The latest release adds socket support, critical for the HPC device to communicate with the outside world.

 

Why do we want Python on a handheld device? The effect of the recent demise of Apple's Newton has been offset by the success of the Palm Pilot and other handheld products. A number of industries that routinely use handheld technology include: shipping, manufacturing, law enforcement, and health care. The requirement to collect data in an accurate and timely manner make the handheld device uniquely suited for work in these areas.

 

The Python language should have a substantial contribution to make in the handheld arena. It is ideal for use with Windows CE for several reasons. Python programs are small, occupying very little space and convenient to download. The scripts don't require separate compilation for each target platform and are therefore more portable than typical Windows CE applications. Most of the other languages available for the Windows CE platform, with the exceptions of XLisp and Forth, are not available under open software terms. A freely available interpreter isn't the only reason a user or developer will choose Python, but it certainly lowers the entry barrier.

 

Python CE has some limitations that prevent it from being used for general application development. There is currently no way for the user to input data in a dialog box, for instance. However, a set of GUI tools should not be difficult to construct because the basic API is already available to Windows CE developers. Although Python CE provides a command line interpreter, Windows CE itself has no equivalent of a command shell. At present, Python CE's usefulness is manifest in building utility programs that are executed as batch scripts.

 

As of release 1.0b1, Python CE provides support for socket communications, including the httplib and ftplib Python libraries. The ability to communicate using standard, non-proprietary protocols has only recently become generally available to handheld users. Python CE supports socket communications via modem and direct ethernet. It does not currently support wireless IrDA capability. Cheap, long-range wireless communications remains the unattained goal of handheld users.

 

To obtain further information or download Python CE, please visit the following location:

 

http://www.digicool.com/~brian/PythonCE/

 

Documentation at the above site includes Python CE installation notes as well as an online discussion forum hosted by Digital Creations, Inc.