By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,676 Members | 2,249 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,676 IT Pros & Developers. It's quick & easy.

Using C libraries

P: n/a
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


Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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/Coo.../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" <Jo***************@boeing.com> wrote in message
news:ma*************************************@pytho n.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

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.