MobileHub


Home | Device rental | Knowledge pool | Courses | Projects | Contact |

Developing Python for Series 60 applications for Mobile Phones

Development is simple and fast. In order to run a Python program of your Nokia Series 60 phone, all you have to do is to:

1. Install the Python interpreter application as a *.sis file called "Python for Series 60" which you can download for free from the Nokia site. (Check for latest version)
2. Then write your python script with a simple editor on your Mac/PC, save it as a *.py file
3. Push your *.py file to your phone via Bluetooth and simply run it. No compile, no build process needed.

"Python for Series 60" is an ideal choice for starting to create applications for devices based on Series 60 Platform because it is easy and quick. It is well suited for the development of prototypes or for building applications to make proof of concept with a simple and consistent language. Only some knowledge on any scripting language is enough to understand the programming of python scripts and to create working applications in a very short time.


What is Python?


• Python is an Open Source programming language devloped by Guido van Rossum )
• Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. The popularity of Python is on the rise.
• Python combines remarkable power with very clear syntax.
• It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing.


What is Python for Series 60?


Python for Series 60 brings the Python programming language to the Series 60 Platform, Nokia's "modified/enhanced" version of the Symbian Operating System platform for Mobile devices. Currently Python for Series 60 is based on Python 2.2.2. It Supports many of the Python Standard Library modules but has on top a few mobile platform specific modules e.g.
- native GUI widgets,
- Bluetooth
- GPRS networking
- GSM Location information,
- SMS Messaging,
- Acces to camera and more!


Supported Mobile Devices (Spring 2005):


Nokia 6630, Nokia 6600, Nokia 7610, Nokia N-Gage QD


Capabilities of Python for Series 60:

• GUI: Menu, Forms, Listboxes, Input fields, Dialogs, Notes
• Graphics: - color, font and style attributes, - direct-screen drawing, - displaying images and icons
• Key-down and key-up events
• Sockets: TCP/IP, Bluetooth (RFCOMM, OBEX)
• Messaging (SMS)
• Networking (HTTP, FTP, …)
• Acess to file system, file reading, XML, RSS
• Acess to camera, telephone
• Acess to calendar, contacts, sysinfo
• Location (cell-id)
• Content handler
• Python extensions can be written in C++
• Make standalone applications


Specifications

• API_Reference_for_Python_...._.pdf provided by Forum Nokia
 

 

Tools


• Simple text editor on Mac or PC or e.g. ConTEXT, a feely downloadable editor

Only for testing with an enulator:

• Series 60 SDK for Symbian OS incl. Emulator:
-> Forum Nokia

• "Python Plug-in" for Series 60 SDK (to test your python script with the emulator)
e.g. Python_..._for_Series60_..._SDK_..._.exe, downloadable for free from Forum Nokia
(Check from that Nokia site which is the correct file for you).


Documents / books


• Starting Documents (find here):
- Getting_Started_with_Python_..._.pdf
- Programming_with_Python_..._.pdf
- API_Reference_for_Python_..._.pdf
(Are in zip file included when downloading the python for series 60 app.)

• Books:
- thinkCSpy.pdf: How to Think Like a Computer Scientist, Learning with Python.
By Allen Downey, Jeffrey Elkner, Chris Meyers Published by Green Tea Press, Wellesley, Massachusetts
- ActiveState Python Cookbook
- „Programming Python “ by Mark Lutz, O'Reilly, (ISBN: 0-596-00085-5)


Uselful links:


Download site of Python for Series 60 (Nokia)
Developer Discussion Boards (Nokia)
PythonForSeries60 Wiki
HIIT
O'Reilly Python DevCenter
Python editor on the phone
 


How to develop Python for Series 60 Applications (practical steps):
• Install the Python for series 60 application on your series 60 device (PythonForSeries60_..._.sis file)
• Write your python script in your editor (text editor) on Mac/PC, save it as *.py (sometimes it is useful to start with some existing skeletton code - see below - and modify it accordingly)
• Testing the script on phone:
* Push your *.py scipt to your phone via bluetooth or PC suite
* Open the received message and install as Python script
* Run script
• Testing the script on PC
* Install Series 60 Developer Platform SDK (includes Emulator). Install "python plug-in" files from „PythonForSeries60_SDK_..._.zip“ (into a specific folder, check documentation)
* Load script it to Emulator (copying your *,py file to a specific folder) for testing on emulator. Open the python application via the "snake" icon on the emulator and run your script.

Skeletton code

Find feature specific python skeletton here later in the year 2005.
Example Python scripts are included in the download package of the Python for Series 60 file.

 

MediaLab

© 2005 Jurgen Scheible .