The changes needed for porting existing native PyS60 extensions are as follows:
From Symbian 9.1 onwards Symbian allows Writable Static Data in a DLL
by making use of EPOCALLOWDLLDATA keyword in the mmp file. Main reason for
this one is for porting some non-Symbian applications onto Symbian. Thus
TLS functionality is no longer needed. Use EPOCALLOWDLLDATA in the MMP file
if the module has initialized static data.
Use PyGILState_Ensure() and PyGILState_Release() functions for acquiring and
releasing the global interpreter lock, instead of using
The interpreter DLL name is changed to python25.lib. This change has to be reflected in the MMP file
so that the module is linked against this DLL instead of python222.lib used in 1.4.x.
The Python header files are now in epoc32includePython25 and hence
the MMP file needs to be updated accordingly.
The pyd name should be kf_<module-name>.pyd.
This change is required only for the pyd name and module name is not required to have this prefix.
Packaging an extension module is explained in section 8.1.3, Distributing extension modules.
The init-function still needs to be exported in the pyd at ordinal 1.
Script related changes
The main script of the PyS60 applications, default.py is not executed directly,
as was the case in PyS60 1.4.x. The wrapper script, launcher.py is first
executed which in turn does an execfile on the default.py. Therefore, to exit
the application programmatically use appuifw.app.set_exit() or
PyS60 1.4.x extension modules socket and calendar are renamed to btsocket and
e32calendar due to the conflicting names with Python core modules. Two
packaging modes pys60 and pycore have been provided with Application Packager
tool to maintain the compatibility with PyS60 1.4.x binaries. The existing scripts
dependent on these extension modules need not be modified if it is packaged
with pys60 mode.
Unlike PyS60 1.4.x the module names are case sensitive from PyS60 1.9.x. So
the scripts written for 1.4.x will require changes to account for this.