generic way to access C++ libs?
jacek.generowicz at cern.ch
Mon Nov 8 11:37:20 CET 2004
aleaxit at yahoo.com (Alex Martelli) writes:
> Jacek Generowicz <jacek.generowicz at cern.ch> wrote:
> > Gabriel Zachmann <zach at cs.uni-bonn.de> writes:
> > > Is there any generic way to use C++ libraries from within Python.
> > > Without doing anything else (such as recompiling the library or
> > > generating wrappers).
> > Bit of a tall order, don't you think?
> Well, ctypes does that for C libraries (as long as they're
> DLL/so/dynlib/...), it's not immediately obvious that using C++
> libraries is an order of magnitude harder (though probably true).
Maybe not _immediately_ obvious, but obvious after a few minutes
> > What would be so cumbersome about invoking a single program which
> > requires the location of the library, the location of its headers, and
> > which gives you a Python module wrapping the library in return ?
> Without a C/C++ compiler around, you mean? Most Python users these days
> don't have one (as they use Python on Windows)...
Good point. I hadn't though of this one. In my environment the users
are expected to have at least one C++ compiler, and are even expected
to use it on a regular basis.
More information about the Python-list