python and shared libaray

Jesper Olsen jolsen at
Tue Jun 11 11:33:28 CEST 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
a big problem.

See the "Writing an extention module" in the standard documentation.

I recommend that you use distutils for installing/compiling your
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").


spokra at (Steven Pokrandt) wrote in message news:<a263f04a.0206101820.5461339f at>...
> 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
> 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