I want to use a C++ library from Python

Christian Heimes lists at cheimes.de
Wed Sep 10 08:53:40 EDT 2008


Diez B. Roggisch wrote:
> Which actually isn't really helpful, as a DLL itself says nothing about what
> language was used to create it - and sending the OP to e.g. ctypes makes no
> sense at all in the face of C++.

The library - or more precisely the calling convention of the library - 
is related to the solution. On Windows a dll might be a container for a 
.NET assembly and C++ code can (theoretically) be compiled to .NET, too.

> Whereas the first link for "python c++" is Boost::Python, a C++-wrapper to
> make C++-code accessible from Python.

C++ bindings can be created with SIP, SWIG, Boost or hand written code. 
Multiple sites claim that SIP generates the fastest code.

Christian




More information about the Python-list mailing list