| Reply | « Previous Thread | Next Thread » |
|
I'm new to this and so I apologize for asking something so simple. But how do you make an extension work on a device or emulator? I want to use the callstatus extension. All the zip file comes with is callstatus.pyd. I tried putting it in my python directory but that doesn't work. I read somewhere that I need to make a sis file and sign it and then use that to install the .pyd file, but i don't have a pkg file so I’m not sure how to do that. If someone could walk me through this I'd appreciate it.
Also is there a way to answer a incoming call using python? Could I uses key presses or something to make it look like the user answered the phone? Thanks a lot. |
|
Just push it with Bluetooth to the phone.
It will ask you whether to install it as a script or lib module. Choose the latter one. Then it should work ![]() galaktico |
|
How to install a .pyd file depends on if you're running on 3rd edition or not. On 2nd edition you can simply Bluetooth it over and select "install as library". On 3rd edition you need to package it into a signed SIS file. Also, .pyds compiled for 2nd edition don't work on 3rd edition - they need to be ported to 3rd edition separately.
|
|
I'm running a 3rd edition on a N80. So for me to use callstatus I need to find a version compiled for 3rd ed. Thanks for pointing that out.
Also if I want to use a .pyd file can i just do the following: Code:
import sys
sys.path.append("path where .pyd file is")
import pydfile
|
|
Actually, no. In 3rd edition _all_ binaries are loaded from \sys\bin. The phone refuses to load binaries anywhere else.
Note that until now it has been necessary to use certain boilerplate loader code when implementing Python extensions for S60 3rd edition - this will no longer be necessary in the next release (1.3.15). |
|
Also, I'm hoping to have time to make an example of writing an extension for 3rd Edition sometime this year...
|
|
Quote:
pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 ! pys60 extension modules on http://cyke64.googlepages.com/ |
|
A long-standing bug in PyS60's DLL loading code was fixed. That used to panic the application if trying to load a nonexistent DLL.
Now that it was finally fixed it was possible to write an import hook that on import tries to first load any Python libraries that are available and if those aren't found it tries to load a .PYD with that name. This import hook concentrates the 3rd edition PYD loading trickery in one place, site.py. |
|
Quote:
- that would be very nice. I am trying to write a Python extension for a 3rd edition device (5500) to access the accelerometer data. I started out with the Symbian C++ SensorTest application from Nokia - it works fine - and went on with the Python extension examples by Paul Wisner (http://people.csail.mit.edu/rudolph/PythonExtension.pdf) but it seems that the latter cannot be used with the 3rd edition toolchain. Can you give any hints or examples on how to build an extension for 3rd ed. ? |
| jespern129 |
| View Public Profile |
| Find all posts by jespern129 |
|
Right now the best documentation is 1) the section at the end of the PyS60 Library Reference 2) the source code of PyS60
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| OMA DRM v2 extensions | heuven | Digital Rights Management & Content Downloading | 1 | 2008-08-27 05:30 |
| Midp Extensions. | 1xuname1x | Mobile Java General | 5 | 2005-06-21 13:07 |
| Inputstream file extensions | LeloProductions | Mobile Java General | 5 | 2003-09-18 12:21 |
| Questions about file extensions of resources. | Steven_Ch | Mobile Java General | 6 | 2003-07-08 15:21 |
| Nokia active server and Openwave's GUI extensions | trasatti | WAP Servers | 0 | 2002-10-15 15:03 |