Using C libraries

Larry Bates lbates at swamisoft.com
Wed Apr 28 15:17:39 EDT 2004


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








More information about the Python-list mailing list