Matt Croydon
S60, formerly known as Series 60, is a smartphone platform built on top of Symbian OS.
Python allows developers to write useful applications with very few lines of code. Many standard libraries and APIs are available and virtually any C++ API can be wrapped in a Python extension. Because of this Python allows deeper access to phone features with less overhead than alternatives like J2ME or Symbian C++.
http://sourceforge.net/projects/pys60/
- Phone installer (.sis)
- SDK
- Source code
Jurgen Scheible's awesome mobilelin tutorial and videos
Check the technical device specifications for the correct version to download for your phone.
Hello World:
import appuifw appuifw.note(u"Hello", 'info')
Input (simple popup):
name = appuifw.query(u'Enter your name', 'text')
easy to write
Native widgets
The entire Python Standard Library is not distributed with PyS60
Some highlights:
anydbm, math, md5, re, urllib, zlib
Many other pure-python libraries "just work" by copying the pure python libs (and any dependencies) from the python 2.2.2 source.
sysinfo: access information about the device (battery levels, memory information, etc.):
battery(), imei(), total.rom()
camera: modify camera settings and take pictures:
image = camera.take.photo()
graphics: create games and custom UIs
audio: play and record audio
telephone: send an SMS:
telephone.dial('411')
inbox: manipulate messages in your inbox
location: retrieve information about cel towers
contacts: access and change
Add, delete, modify:
now = time.time() cal = calendar.open() a = cal.add_appointment() a.content = 'urgent meeting' a.set_time(now, now) # start and end time a.commit()
From Series 60 snippets
PDIS (Personal Distributed Information Store)
- Jabber client/library, expat, xpath, iCal, others
PDIS also has a S60 compatability library that uses wxPython to emulate appuifw. This library makes initial application development very easy because apps can be roughed out on a desktop machine without having to code, send to device, load, test.
Nick also has some awesome Python for Series 60 apps and hacks including NMEA Info and log location.
Many pure python libraries "just work" with either the core PyS60 distribution or with the addition of required libraries from the Python 2.2.2 source.
Since PyCon last year:
Note that apache + mod_python is an internal Nokia research product and is not available to the general public.
Questions?
Slides are available at
http://postneo.com/talks/pycon2006/
ReST source: