You Are Here:

Community: Developer Discussion Boards

#1 Old How to use extensions - 2006-11-17, 08:01

Join Date: Oct 2006
Posts: 10
jetherton
Offline
Registered User
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.
Reply With Quote

#2 Old Re: How to use extensions - 2006-11-20, 19:01

Join Date: Oct 2006
Posts: 17
galaktico
Offline
Registered User
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
Reply With Quote

#3 Old Re: How to use extensions - 2006-11-21, 17:19

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
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.
Reply With Quote

#4 Old Re: How to use extensions - 2006-11-22, 06:42

Join Date: Oct 2006
Posts: 10
jetherton
Offline
Registered User
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
Thanks for your help.
Reply With Quote

#5 Old Re: How to use extensions - 2006-11-22, 22:49

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
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).
Reply With Quote

#6 Old Re: How to use extensions - 2006-11-22, 22:50

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Also, I'm hoping to have time to make an example of writing an extension for 3rd Edition sometime this year...
Reply With Quote

#7 Old Re: How to use extensions - 2006-11-23, 19:09

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Quote:
Originally Posted by jplauril
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).
Could you explain why this wrapper was mandatory and after this 1.3.15 it won't be necessary ?


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/
Reply With Quote

#8 Old Re: How to use extensions - 2006-11-24, 11:33

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
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.
Reply With Quote

#9 Old Re: How to use extensions - 2006-11-24, 11:54

Join Date: Oct 2006
Posts: 8
Location: Aarhus, Denmark
jespern129
Offline
Registered User
Quote:
Originally Posted by jplauril
Also, I'm hoping to have time to make an example of writing an extension for 3rd Edition sometime this year...
Hello
- 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. ?
Reply With Quote

#10 Old Re: How to use extensions - 2006-11-24, 13:12

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Right now the best documentation is 1) the section at the end of the PyS60 Library Reference 2) the source code of PyS60
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
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

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d81449X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZpythonQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZuserE5ftagQSxpythonX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ