473,394 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to use my dynamic link libraries in python??

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
2 1537
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
éƒ*勇军 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: John Hunter | last post by:
I am using distutils to build a python extension module on win32. I initialize the Extension class with a list of libraries with Extension("_gd", , include_dirs=incdirs, library_dirs=libdirs,...
2
by: Chris Hodapp | last post by:
I have seen messages posted about this before, and there is a clear reference to it in the manual, but I have been unable to find a solution. I'm on Slackware 9.1, kernel 2.6.0-test11, using...
1
by: John S Dalzell | last post by:
Hi, I have a C++ app which needs to work with a server on a remote machine. The manufacturer has given us a set of DLL's which provide API calls to send requests to the server and receive an...
0
by: Christopher Kurtis Koeber | last post by:
Dear All, Is it possible to perform the following with dynamic link libraries with Visual Basic .NET: 1. Use a variable representing the location of the DLL. For example : Declare Function XYZ...
4
by: yhebib | last post by:
Hello All, I've been browsing and reading all articles I could find on technet ,msdn and other knowledgeable sources to understand the issue I'm dealing with. However, I did not find so far how...
1
by: zpinhead | last post by:
I am unable to get my downloaded extension from pecl to link up with php properly. seems like the php.so I could not use pear install http. pear claimed the extension was already installed....
6
by: Bill Spotz | last post by:
Hi, Is there a way to tell an executing python script where to look for dynamically-loaded libraries? My situation is that that I am developing python wrappers for a large software project. ...
1
by: Rajeshwaran | last post by:
Hi, I have an application which uses 4 libraries.(cppunit, factory, awscomm, pthread) I need to statically link the cppunit library and dynamically link the other libraries. Is this possible?...
6
by: Even | last post by:
Hi all, As far as I know, relative address will be assigned by program at link time.Right? Ok, here we go. So if we use a static library, it will give the program an relative address(i mean...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.