Discussion Board

Results 1 to 7 of 7

Thread: import C dll

  1. #1
    Registered User NaKeD's Avatar
    Join Date
    Jul 2008
    Posts
    8
    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 jethro.fn's Avatar
    Join Date
    May 2004
    Location
    Tampere, Finland
    Posts
    524
    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 miohtama's Avatar
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376
    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 NaKeD's Avatar
    Join Date
    Jul 2008
    Posts
    8
    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 miohtama's Avatar
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376
    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 NaKeD's Avatar
    Join Date
    Jul 2008
    Posts
    8
    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 miohtama's Avatar
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376
    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 C++
    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 C++
    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 Python
    Replies: 7
    Last Post: 2007-10-21, 15:56
  5. SyExpat + problem + memmove + Carbide Express
    By pearman in forum Symbian C++
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved