From: news at dorb.com (Darrell)
Date: Mon, 5 Apr 1999 14:12:04 -0400
Subject: swig or not to swig ?
References: <4p6O2.1348$8m5.2126@newsr1.twcny.rr.com>
Message-ID: <kZ6O2.1351$8m5.2222@newsr1.twcny.rr.com>
Content-Length: 1304
X-UID: 1250                                                  

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.
>
>
>
>






