Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Archived:PySymbian for 5th Edition with sample applications

From 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
S60 5th Edition
Created: croozeus (07 Oct 2008)
Last edited: hamishwillee (31 May 2013)



With the launch of S60 5th Edition SDK, a new gate opens for S60 developers, to develop Touch UI based applications.

PySymbian is Nokia's port of the Python language to the S60 smartphone platform. In addition to the standard features of the Python language, PySymbian provides access to many of the phone's uniquely smartphone-y functions, such as camera, contacts, calendar, audio recording and playing, Bluetooth communications, simple telephony, etc.

All releases of Python for S60 are available at The latest release of PySymbian till date is Python 1.4.4 which is available for 2nd edition and 3rd edition devices and Emulators. Nokia hasn't yet released the PySymbian version for 5th edition SDKs. But in this article, we will see how to use PySymbian on 5th edition emulator.

Tools and SDKs Required

  • S60 5th edition SDK which is available for download at Nokia Developer website.
  • As PySymbian for 5th edition is not yet released and available, we will try to use PySymbian SDK for 3rd edition on 5th edition SDK. Python SDKs are available at
  • A simple text editor for trying sample applications and scripts - for eg. word or notepad.

Installation and Setup

  • Download and install S60 5th edition SDK to the default path (C:)

After installing the SDK, launch C:\S60\devices\S60_3rd_FP2_SDK\epoc32\release\winscw\udeb\epoc.exe The emulator should launch, as other emulators, it takes some time to launch. Select the country, date and time as required. After you are done with exploring for a while, close the emulator.


  • Download Python SDK from -
  • Open the PythonForS60_1_4_4_SDK_3rdEd with winzip or winrar. Unzip the epoc32 folder to a folder named python_3rd_sdk_filesItalic text.

The unzipped epoc32 folder should have following 4 folders,

    • include
    • release
    • tools
    • winscw

Pys603rdfiles 5thEdition.jpg

  • Now Open the path C:\S60\devices\S60_5th_Edition_SDK_v0.9\epoc32 in the windows explorer.
  • Copy files and folders from the below mentioned to the epoc32 folder of 5th Edition SDK.

This may take some manual labour, But please take care not to replace the epoc32 folder with the unzipped folder.


  • Launch the emulator again -> C:\S60\devices\S60_3rd_FP2_SDK\epoc32\release\winscw\udeb\epoc.exe
  • Go to Menu -> Applications-> Python !

Follow the screen shots below.

Menu 5thEdition.jpg Apps 5thedition.jpg

Pys605th 5thEdition.jpg

Thus PySymbian is now installed on your S60 5th edition emulator. Let us try few things.

Trying the Touch UI with PySymbian

Launch Python on the emulator -> Options -> Interactive Console

Write the following commands...

>>>import globalui
>>>globalui.global_query(u"Is this how it works?")

Globalui1.jpg Globalui 5thEdition.jpg

The 5th edition emulator has an Alphanumeric Keyboard - so the brackets would be accomplished in that keyboard by pressing the '*' key. The screen shots are shown below.

Edittools 5thEdition.jpg

Next lets try the which takes keypress as input in 5th edition pre-releases (3rd, 2nd and 1st edition) devices.

Go to Python -> Options -> Run Script ->


Move the mouse on the emulator screen and the ball will follow it.

Other Sample Applications

If all the folders mentioned above have been copied properly, then some scripts can be found in epoc32\winscw\c\python folder.

Launch Python on the emulator -> Options -> Run Script ->


Samplecube 5thEdition.jpg


Snakepy 5thEdition.jpg

Strange enough the snake doesn't respond to Touch interface as the does.

3) Further, lets try out the following application which gives system information.

The module we use is sysinfo.

#import modules
import sysinfo,appuifw, e32
#switch screen to large'large'
app_lock = e32.Ao_lock()
#define exit function
def exit_key_handler():
#Prepare for red text,
tx.font=u"Nokia Hindi S6017" # specify font = appuifw.STYLE_BOLD
tx.add("Battery level: "+unicode(sysinfo.battery())) #prints battery strength
tx.add(u"\nSignal strength: "+unicode(sysinfo.signal_bars())) #prints signal strength
#Both values are between 0 and 7
tx.add(u"\nRAM:"+unicode(sysinfo.free_ram())) #print free ram
tx.add(u"\nFree disk:"+unicode(sysinfo.free_drivespace()['C:'])) #Or E: for memory card
#prints disk space
tx.add(unicode(sysinfo.imei())) #prints IMEI of the device
tx.add(u"\nFirmware version:")
tx.add(unicode(sysinfo.sw_version())) #prints firmware version
tx.add(u"\n\nThe display is "+unicode(sysinfo.display_pixels()[0])+"X"+unicode(sysinfo.display_pixels()[1])) #prints phone's display in pixels
tx.add(u"\n\nThe current profile is ")
tx.add(unicode(sysinfo.active_profile())) #prints current profile = exit_key_handler

When we run the script, we get the following output.

Sysinfo 5thEdition.jpg

4) Next, lets try Unity game by JOM

Unity 5thEdition.jpg

The Unity game also, doesn't respond to the touch interface of the emulator as the does.


The new Touch UI offers great opportunities in mobile application development and could prove versatile with rapid prototyping languages like Python. PySymbian for 3rd edition runs on S60 5th edition SDK,but there are some hinges, which hopefully would be sorted out in the official PySymbian release for 5th edition devices.

This article is written by croozeus 17:41, 7 October 2008 (EEST)

See Also

This page was last modified on 31 May 2013, at 01:05.
109 page views in the last 30 days.