×

Discussion Board

Results 1 to 7 of 7

Thread: import C dll

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    8

    import C dll

    Hey everybody.

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

    thx!!

  2. #2
    Super Contributor
    Join Date
    May 2004
    Location
    Tampere, Finland
    Posts
    524

    Re: import C dll

    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".

  3. #3
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376

    Re: import C dll

    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

    http://mfabrik.com
    http://blog.mfabrik.com

  4. #4
    Registered User
    Join Date
    Jul 2008
    Posts
    8

    Re: import C dll

    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#

  5. #5
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376

    Re: import C dll

    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

    http://mfabrik.com
    http://blog.mfabrik.com

  6. #6
    Registered User
    Join Date
    Jul 2008
    Posts
    8

    Re: import C dll

    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.

  7. #7
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376

    Re: import C dll

    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

    http://mfabrik.com
    http://blog.mfabrik.com

Similar Threads

  1. GoogleIt
    By deepika.mangla in forum Symbian
    Replies: 5
    Last Post: 2011-05-28, 11:04
  2. Fail to build syexpat 1.3 under 2nd FP3
    By harry_zhang in forum Symbian
    Replies: 10
    Last Post: 2010-03-19, 10:24
  3. bluetooth setting using bluecove
    By amoon108 in forum Bluetooth Technology
    Replies: 0
    Last Post: 2008-10-15, 10:11
  4. problem on running my application
    By rsf in forum Symbian
    Replies: 7
    Last Post: 2007-10-21, 15:56
  5. SyExpat + problem + memmove + Carbide Express
    By pearman in forum Symbian
    Replies: 2
    Last Post: 2006-10-14, 22:21

Posting Permissions

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