SDSU Emerging Technologies
Fall Semester, 2005
Python For Series 60 p1
Previous     Lecture Notes Index     Next     
© 2005 All Rights Reserved, SDSU & Roger Whitney
San Diego State University -- This page last updated 13 Oct 2005

Doc 13 Python For Series 60 p1



Short Installation Instructions    

Writing Applications for Cell Phones    

Some Development Platforms    


Nokia Development Platforms    

Series 60 Python Overview    

appuifw Module    


Copyright ©, All rights reserved. 2005 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA. OpenContent ( ) license defines the copyright on this document.




Python for Series 60 Platform API Reference

Programming with Python for Series 60 Platform





Useful References


CS457/546 - Information for Python Programming on our Nokia Devices,


Matt Croydon PythonForSeries60 Wiki,


Nokia Python for Series 60,


Nokia Python for Series 60 Forum,






Python for Series 60 Platform API Reference

Programming with Python for Series 60 Platform


Both are pdf files

Available at,,034-821,00.html

Go to bottom of page & click on Python for Series 60 Documentation bundle



Short Installation Instructions

Cell Phone Emulator on Windows


Step 1. Download the following

Step 2 Follow the instructions for installing in the above under Environment


This is the preferred solution if it works


The emulator provides a cell phone interface


Python only works when emulator runs in debug mode


wxPython for Windows, Linux & Mac OS X


Step 1 Install wxPython

Download at: /

Download and install version with unicode support

Prebuilt binaries work fine

Follow the instructions with the wxPython download


Step 2 Install Series 60 Compatibility Library

Download at:

Follow the instructions with the download


This allows code written for Python Series 60 to run using wxPython widgets

  1. Does not look like applications on cell phone

  1. Not all features will work


Supports appuifw, e32, key_codes


Hello World Example


import appuifw


appuifw.note(u'Hello World', 'info')


wxPython Version





Writing Applications for Cell Phones

Technical constraints


  1. Limited screen space

  1. Limited storage space

  1. Limited memory

  1. Limited power

  1. Slow processor

  1. Restricted user input

  1. Network connection questionable

  1. Feature set of phones vary

  1. Memory leaks not allowed


Business Constraints


  1. Most phones are not programmable

  1. Multiple incompatible OS/programming systems

  1. How much are people willing to pay for cell phone program

  1. Do people see a need for 3'rd party applications

  1. Main sellers are games and ring-tones




Issues to Consider

  1. Language

  1. Features

  1. Security

  1. Distribution

  1. Phones/providers supported



Some Development Platforms

  1. Qualcomm Brew

C++, claim some Java support


  1. Java J2ME

Support from multiple venders

Abstraction can limit access to phone features


  1. WinCE

Multiple devices

Multiple development systems


  1. Symbian OS

Primarily Nokia phones


  1. Linux


Symbian /

Produces OS for advanced cell phones

1200 employees

Owned by:

  1. Ericsson (15.6%)

  1. Nokia (47.9%)

  1. Panasonic (10.5%)

  1. Samsung (4.5%)

  1. Siemens (8.4%)

  1. Sony Ericsson (13.1%)




LG Electronics


Ben Q








Sony Ericsson


40 million Symbian phones at end of Q1 2005

14.5 million Symbian phones shipped first half of 2005



Symbian OS



Version 9.0 is real-time, previous versions not real-time




  1. HTTP, TCP/IP, POP3, SMTP, WAP 2.0


  1. SMS, EMS, MMS

  1. Cameras,OpenGL

  1. Contains two DBMS (database) implementations

  1. multi-tasking

  1. Version 9.0 is real-time, previous versions not real-time

  1. Unicode 3.0



Nokia Development Platforms





Nokia Development Platforms

Series 40

  1. Java only

  1. 70 phone models

  1. ~300 million shipped


Series 60


  1. Java, C++, Python, Visual Basic, C#

  1. 20 phone models

  1. ~20 million shipped


Series 80


  1. Java, C++, Visual Basic, C#

  1. 2 phone models (Communicator series)



  1. Based on Series 40

  1. Java only



Series 60 Python Overview


  1. appuifw

application user interface framework

  1. graphics

  1. e32

OS related utilities

  1. e32db

database access with limited SQL

  1. e32dbm

access Symbian RDBMS

  1. messaging (SMS)

  1. location - GMS location

  1. sysinfo

  1. camera

  1. audio

record & play

  1. telephone

  1. calendar

  1. contacts

  1. Extensions to standard libraries

  1. thread

  1. socket - added Bluetooth support


appuifw Module

Interface to the Series 60 UI application framework

  1. Module Functions

  1. Application

  1. Forms

  1. Text

  1. Listbox

  1. Icon

  1. Content_handler

  1. Canvas




appuifw Functions

import appuifw


userInput = 'Hi mom'

while userInput:

    userInput = appuifw.query(u'Enter a string', 'text', userInput)

    if userInput == None:


    appuifw.note(u'You typed: ' + userInput, 'info')


appuifw.note(u'Multi-query', 'info')

answer1, answer2 = appuifw.multi_query(u'A', u'B')


appuifw.note(u'popup_menu', 'info')

selectedIndex = appuifw.popup_menu([u'a', u'b', u'c'])

selectedIndex = appuifw.popup_menu([u'a', u'b', u'c'],\

     u'Select one')


appuifw.note(u'multi_selection_list', 'info')

selectedIndex = appuifw.multi_selection_list([u'a', u'b', u'c', u'd'], \

    style='checkbox', search_field=1)




First Application

import appuifw

import e32


old_title = = u"Hello World"


class HelloWorld:

    def __init__(self):

        self.lock = e32.Ao_lock() = self.exit_key_handler


    def run(self):




    def exit_key_handler(self):



    def close(self): = None


myApp = HelloWorld() = old_title = None

Previous     visitors since 13 Oct 2005     Next