Using C libraries

Laughlin, Joseph V Joseph.V.Laughlin at boeing.com
Wed Apr 28 15:27:43 EDT 2004


I was thinking more along the lines of unix C libraries, not windows
DLL.

Also, has anyone had any success getting Python to use Ada data
structures?

Joe Laughlin

-----Original Message-----
From: Larry Bates [mailto:lbates at swamisoft.com] 
Sent: Wednesday, April 28, 2004 12:18 PM
To: python-list at python.org
Subject: Re: Using C libraries

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" <Joseph.V.Laughlin at boeing.com> wrote in message
news:mailman.92.1083177600.25742.python-list at python.org...
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





-- 
http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list