Python 2.2.1 for EPOC Release 5

This is a port of python to the epocemx SDK by Eberhard Mattes, which itselfs uses the SDK by symbian. Essentially epocemx it is a POSIX look alike environment for the EPOC OS. For more informations look at:

python and epocemx runs on Epoc Release 5 machines: Psion 5mx, 5mx Pro, Psion Revo, Psion Netbook and on the Ericson M128. It may run on Epoc Release 3 Hardware (Series 5 classic), too. For more information about this hardware please refer to

Vendors which like to have support for their devices are free to send me a sample.


Python itself and its standard library requires 3.5 MB disk space.

The curses, lib-tk, distutils and test modules have been left out.

Please get (version 20020813) first and install it. Please read the instructions at C:\emx\doc\emx.txt for configuring the softlink to /usr. I.e. if you like it to use on a Psion Revo type:

rm -f /usr ; ln -s /C:/emx /usr

For the Psion 5mx (pro) this link has to point to the drive you like to install python. For instance installing python to D:

rm -f /usr ; ln -s /D:/emx /usr

Download python-2.2.1 (version 1.01) and install it.

Type "python" to start. (it will complain about missing platform files, this can be ignored for now)


Please use the epocemx shell to start python. python integrates with the conventions of epocemx.

Restrictions of this Python port

Compiling Python with epocemx

You will need to build the epocemx SDK from Eberhard Mattes yourself.

export RANLIB=arm-epoc-pe-ranlib
export AR=arm-epoc-pe-ar
export CC=arm-epoc-pe-gcc
export CXX=arm-epoc-pe-gcc
export MACHDEP=epoc
export LDFLAGS=-Wl,-heap,16M

configure --prefix=/usr --with-suffix=.exe


# make dies when trying to run python
# this is o.k.

rm -rf $INST
mkdir $INST
make prefix=$INST install
mv $INST/bin/python2.2.exe $INST/bin/python.exe
recode ../crlf <LICENSE >/tmp/LICENSE
mkdir /tmp/doc

recode ../crlf < Misc/EPOCEMX-NOTES >/tmp/doc/emxpython.doc
rm -rf $INST/lib/python2.2/curses $INST/lib/python2.2/lib-tk
rm -rf $INST/lib/python2.2/distutils $INST/lib/python2.2/test

cd Misc && python $INST >python.pkg && emxsis python.pkg


I am offering this port "as is". You can ask me questions, but I can't guarantee I'll be able to answer them. My psion is dead now, so please do not expect updates.


Very special thanks to Eberhard Mattes for epocemx.

Special thanks to: Otfried Cheong, James "Wez" Wetherall and Duncan Booth for their python ports.