PyS60 python modules

From OpenSource

Jump to: navigation, search

Python for S60 python modules (.py's) are libraries that enable access to functionality not provided by the standard PyS60 distribution.

  • firmware.py 0.5 This python module allow you to determine Nokia phone model. Only work for Nokia S60 phones ! ISSUE : Don't work with N80 :( Apache license 2.0 by Cyke64 and Korakotc
 import firmware
 print firmware.phone_model


  • datetime Python for S60 doesn't have a decend date/time class.

There's a small compatible library from the Python Web Project and adapted by korakotc. You can see doc here

 >>> import datetime
 >>> now = datetime.datetime(2003, 8, 4, 12, 30, 45)
 >>> print now
 2003-08-04 12:30:45
 >>> print repr(now)
 datetime.datetime(2003,8,4,12,30,45)
 >>> print type(now)
 <type 'instance'>
 >>> print now.year, now.month, now.day
 2003 8 4
 >>> print now.hour, now.minute, now.second
 12 30 45
 >>> print datetime.datetime.now()
 2006-09-24 
  • odict.py This module provides two classes OrderedDict, and SequenceOrderedDict. The module is written by Nicola Larosa and Michael Foord. The ordered dictionary is a dictionary-like object (actually a subclass of the normal dictionary data type) that keeps keys in insertion order. BSD License
>>> from smidi import play
>>> play([(64,192), (32, 192)])


import random
import traceS60
def main():
   print "In main"
   for i in range(5):
       print i, random.randrange(0, 10)
   print "Done."
# very important give in trace object the REAL path of your script !
tr=traceS60.trace('e:\\system\\apps\\python\\my\\silly_trace.py')    
tr.go()
main()
tr.stop()
  • Cerealizer 0.3 pickle replacement Pys60 does not currently have working pickle module, so it was ported to python 2.2. It has not tested this much, so beware. See the readme.pys60 for more info.
  • camera.py This module is a modification of the original one supplied with pyS60 1.4. It enables a new 'position' parameter to 'start_finder' method, so you choose any available camera for viewfinder. Adaptation by Daniel Montero [damonmo[at]gmail.com]
Personal tools
MediaWiki Resources