You Are Here:

Community: Developer Discussion Boards

#1 Old import C dll - 2008-12-13, 18:08

Join Date: Jul 2008
Posts: 8
NaKeD
Offline
Registered User
Hey everybody.

What is the simplest and fastest way (if any exist at all) to import a C dll into Python?

thx!!
Reply With Quote

#2 Old Re: import C dll - 2008-12-13, 22:24

Join Date: May 2004
Posts: 524
Location: Tampere, Finland
jethro.fn's Avatar
jethro.fn
Offline
Forum Nokia Champion
Standard Python, version 2.5 and above, has the ctypes module for dynamically linking and accessing shared libraries. This module is unfortunately not available for PyS60. The only way to access external DLLs from PyS60 is to write a Python extension wrapper for each DLL in C++. PyS60 documentation has a chapter for explaining the basics: Chapter 9.2: Extending Python for S60.

EDIT: There is ctypes for PyS60. It requires OpenC and a bunch of other packages installed, so it might not qualify as "simple".
Reply With Quote

#3 Old Re: import C dll - 2008-12-14, 15:34

Join Date: Jan 2004
Posts: 368
Location: Helsinki
Send a message via Skype™ to miohtama
miohtama's Avatar
miohtama
Offline
Regular Contributor
Quote:
Originally Posted by NaKeD View Post
Hey everybody.

What is the simplest and fastest way (if any exist at all) to import a C dll into Python?

thx!!
Please give more details which DLL you are importing and we can give better answers.

See this tutorial:

http://discussion.forum.nokia.com/fo...d.php?t=153062


Mikko Ohtamaa
Twinapex Research
http://www.twinapex.com
Reply With Quote

#4 Old Re: import C dll - 2008-12-14, 18:19

Join Date: Jul 2008
Posts: 8
NaKeD
Offline
Registered User
Quote:
Originally Posted by miohtama View Post
Please give more details which DLL you are importing and we can give better answers.

See this tutorial:

http://discussion.forum.nokia.com/fo...d.php?t=153062
Well, I'd like to import the ICQLib dll so i can send/rcv Instant MSGs and SMS using my ICQ#
Reply With Quote

#5 Old Re: import C dll - 2008-12-14, 20:52

Join Date: Jan 2004
Posts: 368
Location: Helsinki
Send a message via Skype™ to miohtama
miohtama's Avatar
miohtama
Offline
Regular Contributor
Quote:
Originally Posted by NaKeD View Post
Well, I'd like to import the ICQLib dll so i can send/rcv Instant MSGs and SMS using my ICQ#
Looks like ICQlib already has Python bindings - with sufficient expertise you might be able to backport them to Python 2.2.

In any case you need to deal with Symbian C++ coding which might a bit horrifying experience if you haven't done it before.


Mikko Ohtamaa
Twinapex Research
http://www.twinapex.com
Reply With Quote

#6 Old Re: import C dll - 2008-12-15, 22:23

Join Date: Jul 2008
Posts: 8
NaKeD
Offline
Registered User
Quote:
Originally Posted by miohtama View Post
Looks like ICQlib already has Python bindings - with sufficient expertise you might be able to backport them to Python 2.2.
Hey,

What do you mean by ICQLib has Python bindings?
Where can I find those?

Thx.
Reply With Quote

#7 Old Re: import C dll - 2008-12-16, 22:47

Join Date: Jan 2004
Posts: 368
Location: Helsinki
Send a message via Skype™ to miohtama
miohtama's Avatar
miohtama
Offline
Regular Contributor
Quote:
Originally Posted by NaKeD View Post
Hey,

What do you mean by ICQLib has Python bindings?
Where can I find those?

Thx.
http://python.net/~mwh/hacks/icqlib/contents.html


Mikko Ohtamaa
Twinapex Research
http://www.twinapex.com
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
bluetooth setting using bluecove amoon108 Bluetooth Technology 0 2008-10-15 11:11
problem on running my application rsf Python 7 2007-10-21 16:56
GoogleIt deepika.mangla General Symbian C++ 4 2007-01-08 02:07
SyExpat + problem + memmove + Carbide Express pearman General Symbian C++ 2 2006-10-14 23:21
Fail to build syexpat 1.3 under 2nd FP3 harry_zhang General Symbian C++ 9 2006-07-27 14:19

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