Closed Thread
Results 1 to 2 of 2

Thread: C code in Python

  1. #1
    oliver.rush's Avatar
    oliver.rush is offline Newbie
    Join Date
    Sep 2009
    Posts
    24
    Rep Power
    0

    C code in Python

    Here's the thing: there is this library wrote in C, which I cannot modify. I want to be able to use its functions in a program I will write in Python.

    Is there a way to do that, or am I dreaming too high?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    manux's Avatar
    manux is offline Programming Professional
    Join Date
    Oct 2008
    Posts
    234
    Blog Entries
    1
    Rep Power
    14

    Re: C code in Python

    not at all, there are several ways you can achieve that.
    I would just write a wrapper that enables interaction between your library and Python, or you can use tools that will do it for you(but using them is not that simple).
    for example:
    1. Extending Python with C or C++ — Python v2.6.3 documentation

    or google swig,boost, or just Python C wrapper

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 01-01-2011, 09:24 AM
  2. Replies: 11
    Last Post: 07-31-2010, 12:52 AM
  3. Replies: 3
    Last Post: 07-13-2010, 02:30 PM
  4. Making it Standalone from Source Code (Python)
    By annannienann in forum Python
    Replies: 8
    Last Post: 10-02-2007, 09:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

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