swig or not to swig ?

Darrell news at dorb.com
Mon Apr 5 14:12:04 EDT 1999


As is always the case I found the dl module right after making this post.
import imp exposes load_dynamic

It doesn't look like a general purpose shared lib interface.
So now I'm looking at bgen in the tools directory.

Here's a doc string from there.
"""\

Tools for scanning header files in search of function prototypes.

Often, the function prototypes in header files contain enough information
to automatically generate (or reverse-engineer) interface specifications
from them.  The conventions used are very vendor specific, but once you've
figured out what they are they are often a great help, and it sure beats
manually entering the interface specifications.  (These are needed to
generate
the glue used to access the functions from Python.)

In order to make this class useful, almost every component can be
overridden.
The defaults are (currently) tuned to scanning Apple Macintosh header files,
although most Mac specific details are contained in header-specific
subclasses.
"""


Darrell <news at dorb.com> wrote in message
news:4p6O2.1348$8m5.2126 at newsr1.twcny.rr.com...
> Coding a 'C' interface to python seems straight forward. Is swig worth the
> trouble ?
>
> I want to access some shared libs. I tried the dl module which isn't
obvious
> how it works. import dl fails.
>
>
>
>






More information about the Python-list mailing list