8.1 Extending PyS60

The general rules and guidelines for writing Python extensions apply in the S60 Python environment as well.

The steps for the implementation of an extension modules include:

In addition to the concerns common for all Python C extensions, the following principles should be considered when implementing new Python interfaces in the S60 environment:

The pyd name should be of the format 'kf_<module-name>.pyd'. Note that this change is required only for the pyd name and module name is not required to have this prefix.

The module initialization function must be exported at ordinal 1. The module identification is based on the filename only. As a special feature of PyS60, an optional module finalizer function may be exported at ordinal 2.

The extension modules added by the developer should be placed in the module repo folder of the PyS60 Application Packager so that the compiled PYD's can be picked up while packaging. For information on this topic refer 8.1.3, Distributing Extension Modules.

See About this document... for information on suggesting changes.