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

How to use my dynamic link libraries in python??

P: n/a
Hello:
My OS is Linux, I compile my dynamic link libraries , and
want to call the function of my dynamic library through python!
How can I realize the function? Please give me some advices! Thanks
Apr 11 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Apr 10, 9:21 pm, "¾" <linha...@gmail.comwrote:
Hello:
My OS is Linux, I compile my dynamic link libraries , and
want to call the function of my dynamic library through python!
How can I realize the function? Please give me some advices! Thanks
You have several options. You could write a Python extension module to
bind the functions in dylib to the interpreter. You could also have a
look at the ctypes module.
Apr 11 '08 #2

P: n/a
*勇军 schrieb:
Hello:
My OS is Linux, I compile my dynamic link libraries , and
want to call the function of my dynamic library through python!
How can I realize the function? Please give me some advices! Thanks
If the module has a plain C-interface, consider using ctypes to wrap it.
It comes with python2.5, see the docs.

If it is C++, I suggest using SIP, a very good C++-wrapper-generator.
There are other options as well, SWIG and Boost-Python, which I can't
comment though.

Diez
Apr 11 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.