Namespaces
Variants
Actions

Archived:How to do conditionally compile for different PySymbian versions

Jump to: navigation, search
Archived.png
Aquivado: 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

Compatibility
Platform(s): S60 3rd Edition

Article
Keywords: list, sort
Created: JOM (26 May 2009)
Last edited: hamishwillee (31 May 2013)

Introduction

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
appuifw.note(u"1.9.x")
else:
# Pys60 1.4.x or below
appuifw.note(u"1.4.x")
This page was last modified on 31 May 2013, at 04:08.
190 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved