Archived:How to do conditionally compile for different PySymbian versions

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngAquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.

All PySymbian articles have been archived. PySymbian is no longer maintained by Nokia and is not guaranteed to work on more recent Symbian devices. It is not possible to submit apps to Nokia Store.

Article Metadata
Tested with
Devices(s): Nokia N82
Platform(s): S60 3rd Edition
Keywords: list, sort
Created: JOM (26 May 2009)
Last edited: hamishwillee (31 May 2013)


This PySymbian code snippet demonstrates how to do source code variation for PySymbian 1.4.5 (and earlier) and PySymbian 1.9.0 (and newer). You might want to do code variation, because 1.4.5 is the latest stable release and 1.9.x is the current on-going development project. Differences in your script can be small, so variating source code might be easier, faster and more efficient than writing two different versions.

Note that PySymbian 1.9.x supports only S60 3rd Edition (and later) devices and that its functionality is wider and more uptodate than PySymbian 1.4.5 version. However PySymbian 1.4.5 supports additionally also S60 2nd Edition devices.

Code Snippet

if e32.pys60_version_info > (1,9):
# PySymbian 1.9.x and above
# Pys60 1.4.x or below
This page was last modified on 31 May 2013, at 04:08.
25 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.