generic way to access C++ libs?

Alex Martelli aleaxit at yahoo.com
Mon Nov 8 05:11:40 EST 2004


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


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


Alex



More information about the Python-list mailing list