Using C libraries

L

Laughlin, Joseph V

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
 
L

Larry Bates

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.

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Setting CPU Affinity 1
Kiwi 1
Timer events 5
Python security settings 1
Right-click brings up an option menu 0
Upgrading Company's Internal Record Keeping Systems 0
distutils and libraries 0
__init__.py 0

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top