python and shared libaray
Jesper Olsen
jolsen at mailme.dk
Tue Jun 11 05:33:28 EDT 2002
You can not import the .so lib directly - e.g. you need to map python
types to C types when calling functions.
So there is a little more work, but if you are familiar with C it is
not
a big problem.
See the "Writing an extention module" in the standard documentation.
I recommend that you use distutils for installing/compiling your
module.
You can then specify the .so lib so that your C-wrapper code is liked
with the library (see section 3.3.4 in "Distributing Python Modules").
Cheers
Jesper
spokra at home.com (Steven Pokrandt) wrote in message news:<a263f04a.0206101820.5461339f at posting.google.com>...
> I have a vendor supplied .so file, header file and docs. I would like
> to use this
> .so file in python but don't have the src. Is it possible to link
> this library ie:
>
> import filename.so
>
> when I try the python complains about no init function.. can I add
> this to the .so without having the src?
>
> can someone point me to a howto?
>
> please send message to the following address.. spokra (AT) attbi
> (dot) com
>
> you get the meaning of the email address, and hopefully the spammers
> don't
More information about the Python-list
mailing list