I want to use a C++ library from Python

Uwe Schmitt rocksportrocker at googlemail.com
Thu Sep 11 13:15:09 CEST 2008


On 10 Sep., 09:57, Anders Eriksson <andi... at gmail.com> wrote:
> Hello,
>
> I have a C++ library compiled as Windows DLL's. It consists of 32 .h and 1
> .lib and 1 .dll files. I don't have the source code.
>
> How can I create a Python module from these files?

Do you need the full library including classes or just some
functions ?
You could write a wrapper in C around the lib and use f2py or ctypes
to call your wrapper from python.
But that does not work if you want to expose classes.

Greetings, Uwe



More information about the Python-list mailing list