Using C libraries

Discussion in 'Python' started by Laughlin, Joseph V, Apr 28, 2004.

  1. Has anyone had any difficulties using C libraries / data structures with
    python? Are there any things I need to be aware of?

    Joe Laughlin
    Phantom Works - Integrated Technology Development Labs
    The Boeing Company
    Laughlin, Joseph V, Apr 28, 2004
    #1
    1. Advertising

  2. Laughlin, Joseph V

    Larry Bates Guest

    Depends on what you mean by "difficulties". I've interfaced
    Python with lots of different .DLL libraries. The "tricky"
    part is getting enough information about the proper data
    structures for calling the external functions. Much study
    of struct module is normally required. And you need either
    my DLLInterface code:

    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146847

    or you can use Thomas Heller's ctypes module:

    http://starship.python.net/crew/theller/ctypes/

    Or you can roll your own...

    Larry Bates
    Syscon, Inc.

    "Laughlin, Joseph V" <> wrote in message
    news:...
    Has anyone had any difficulties using C libraries / data structures with
    python? Are there any things I need to be aware of?

    Joe Laughlin
    Phantom Works - Integrated Technology Development Labs
    The Boeing Company
    Larry Bates, Apr 28, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. pataN
    Replies:
    1
    Views:
    288
    Dino Chiesa [MSFT]
    Aug 22, 2003
  2. Replies:
    16
    Views:
    1,008
    Chris Uppal
    Apr 6, 2006
  3. Rocky
    Replies:
    2
    Views:
    1,149
    Thomas Matthews
    Apr 6, 2004
  4. Karsten Wutzke
    Replies:
    21
    Views:
    897
    Roedy Green
    Jun 29, 2007
  5. Sriram Srinivasan
    Replies:
    13
    Views:
    542
    Benjamin Kaplan
    Nov 12, 2009
Loading...

Share This Page