Python for Palm update

JEFFERY COLLINS collins at rushe.aero.org
Wed Feb 16 19:26:19 EST 2000


There has been considerable interest recently in porting
python to the palm, even to the point of putting a price on 
it (http://www.cosource.com).  I have mentioned in previous
messages that a port was underway, and more recently that
a release was imminent.  Here is an update on the status
of the project.

I have an unreleased (alpha) python-1.5.1 port that will run
on PalmIII's and greater.  It runs a subset of the test suite
(reduced versions of test_b1, test_b2, test_grammar,test_pow,
and test_types), the results of which are printed on a rather
crude display.  The python VM is a collection of GLib shared
libraries.  Palm applications are built essentially freezing
the module (via a variation on Guido's freeze tool) and 
dynamically linking it with the VM on the palm.  So, python
modules that use only the implemented features can become 
separate Palm applications.  No effort has been made to
integrate python with the palm environment, other than
the ability to access some compiled python library modules 
from a palm database.

Some challenges to developing a robust python implementation
remain.  Here is a short list of them and suggested solutions:

	Recursive function calls fail fatally (for <100 iterations), 
	most likely due to a stack overflow.  Christian Tismer's
	Stackless Python is expected to solve this problem.

	The heap is quite small (~64K on the Palm III) and it
	can quickly fill up.  There are also some memory leaks
	in python-1.5.1, since patched in 1.5.2 that may be
	causing problems.

	Given the limited development tools at the time port began,
	adding extension modules requires a modification to the
	VM libraries.  The deficiencies leading to this problem
	have been fixed in recent (last couple of weeks) versions.

	Python takes a very long time to start and this is _very_ 
	noticable on the palm.  There has been some discussion
	about python's startup time, but I know of no effort
	to speed this up significantly.

Given these problems, I've decided not to release the 1.5.1 port but
instead begin immediately on the 1.5.2+ port.  Given my experience
with the 1.5.1 port and the tool improvement (plus some already
written support code), the second port should be alpha in a few weeks.
My goal is to reduce the footprint/memoryprint of python (as
in the python 1.5.1 port), and get the changes rolled into the
main python branch.  These changes will benefit not only the
palm port, but other small platform ports as well.

I don't plan to focus attention on tight integration with the
palm platform.  Anyone willing to work on the palm side of
things is welcome.  These may include extension modules
(for graphics, events, etc.), a palm application for running
python modules, viewing output, and anything else palm related.
I will be focused on creating a python that is small and efficient,
and a simple extension mechanism (plus possibly a python module 
importing mechanism from palm databases).

Thanks

Jeff




More information about the Python-list mailing list