PyS60 extensions
From OpenSource
Python for S60 native extension modules (.PYD's) are libraries that enable access to platform functionality not provided by the standard PyS60 distribution.
- You can HERE find an updated list of all existing pyd with more details for easy picking !
- Researchers at HIIT have developed lots of goodies for Python as a part of the Personal Distributed Information Store project, like:
- Miso 1.41, a library providing access to various native phone APIs, including Bluetooth name and address, IMEI code, free disk and heap space, vibrate and taking pictures with the camera (`jpeg_bytes = miso.take_photo()`) Miso Source (if you want examples or an idea how to extending Python in C++ !),
- pyexpat for S60,
- S60 Compatibility Library v0.4, a wxPython-based library that allows you to develop appuifw applications on your computer (Mac OS X, Linux, or Windows),
- noninteractive Bluetooth discovery using their own socket module (see pdis-0.10/symbian/ao-socket/test_programs/test_resolver_*.py),
- info on building C++ (and Pyrex) extensions with sdk2unix, including a PyS60 SDK install script,
- the PDIS program itself, which is probably the largest application ever built with Python for S60, and more. The source is "not for the faint of heart", but a useful resource nonetheless.
- Pyrex For S60/Python: Create pyrex extensions to S60/Python.
- Cell Phone programming IAP 2006 A site with software for developping extension in C++ for pys60 !
- appswitch.pyd (Simo Salminen) for 2nd An useful library for handling any app (switch to foreground/background , killing , ending or listing running apps. There's now a 3rd version : WORKING appswitch (LFD) for 3rd(selfsigned) and WORKING appswitch(Cyke64) for 3rd(unsigned)
- fgimage.pyd Another useful library that played with bitmaps (fgimage type ; set , unset and getpixel functions)
- vibra.pyd (extracted from miso !) and music.pyd allow you to emit note from your phone and make it vibrate !
- pys60USB module for linking phone and PC by USB cable. It enables communication with PC using Nokia DKU-2 USB cable (this is the regular cable that comes with the phone). It uses Nokia PC Suite's virtual serial port on the PC side. An example includes simpleusbconsole.py, a usb port of bluetooth console. Previous version is http://pymbian.sourceforge.net/misc/pys60usb-v0.20051028.zip *alpha* release] !
- cElementTreeS60 This package contains pys60 build of XML library called cElementTree. Same functionalities as elementTree but much faster implemented in C.Look at this post on pys60 Forum for more details. cElementTree for 3rd(selfsigned) and cElementTree for 3rd(unsigned) or Source file for 2nd. sis file for 2nd Source file for 3rd. sis file for 3rd
- experimental mmsmodule is an experiment for sending multimedia messages from S60 Python (source code). It includes a native extension (DLL) called mmsmodule.pyd v1.01 that contains one function 'mms_send' with the following syntax:
import mmsmodule retcode = mmsmodule.mms_send(u"012345678", u"Test message", u"e:\\temp\\image.jpg")
Note: the messaging module shipped with version 1.3.8 now has the same function, so soon this extra module is not needed anymore.
- CallStatus module (gets current call status) developed by group 451 spring 2006 at Aalborg University from the Pys60 sysinfo template. Returns value 0 to 9 (0 = callNone , 1= callVoice, 2 = callFax, 3 = callData, 4 = callAlerting, 5 = callRinging, 6 = callAlternating, 7 = callDialling, 8 = callAnswering, 9 = callDisconnecting )
import CallStatus CallStatus.GetStatus()
- keypress v1.02 module containing two functions for simulation of any key press) developed by group 451 at Aalborg University and Cyke64. Include key_modifiers.py !
Now an unsigned dev cert free keypress 1.02 is also available and only available with specific 3rd pys60.It runs only with new pys60 unsigned dev cert. keypress needs special capabilities not available with selfsigned pys60 !!!
from key_modifiers import * from key_codes import * import keypress # Display "a" keypress.simulate_key(EKey1,EKey1) # Display "1" keypress.simulate_key_mod(EKey1,EKey1,EModifierKeypad)
- image1st Allow to old phones Image saving and loading and the famous ImageViewer compatible 1st from Nokia (Apache 2 License by Nikhil Vaj and Otsov and Cyke64)
import image1st bitmap = image1st.convertimage(selected_file) bm = Image.from_cfbsbitmap(bitmap)
- uikludgesThis extension enables you to change the label on the right softkey. Currently it is always 'Exit', even if you can change the action is it binded. This enables you to change it to for example 'Nav' !
import uikludges uikludges.set_right_softkey_text(u"Nav")
- Dashboard from simo salminen contains two interesting library :
- iapconnect.pyd cheap socket.socket(tcp/ip socket) replacement that enables automatic connecting using predefined internet access point.
binary package for 3rd :(unsigned) and (selfsigned)
- akntextutils.pyd (wrapping text module akntextutils.wrap_text_to_array() )
- wap extension enable WAP download from a URL to a file. It is working on small file (ie 1-2Ko) but fails with larger one :( source code. Look at talks about this module
import wap gw="195.115.25.129" url=u"http://www.google.com/" file=u"E:\\index.html" wap.get_file(url, gw, file)
- sysagent 1.11 module. Now you can test if your SIM is ok , phone is connected to charger , current call status , inbox is empty , outbox is empty , your battery status ... More files and explanation
- Albert Huang built a new version of aosocketnativenew.pyd (from the PDIS project) that flushes the device cache before each inquiry (and gives the option to either always lookup names before returning -- resolving -- or returns as soon as it finds a bluetooth id) aosocketnativenew.pyd and a test driver python code for this modified library
- cerealizer is a pickle replacement.
- lightblue 0.1 provides a simple interface to access basic bluetooth operations such as device and service discovery, RFCOMM sockets, and file sending and receiving over OBEX.
- hack allow direct access to phone memory (2nd ed) change memory contents(poke) or look at it(peek) ! There are limitations to direct memory access : you can only peek/poke those memory addresses that are valid for current process ! hack for 2nd,hack for 3rd (selfsigned) and hack for 3rd (unsigned)
- mobihf is a math library from tovganesh for moleculary computations. binary package for 3rd
- serenePy is a Python binding to the S60 3.x web services API.
