[Numpy-discussion] Numpy and C++ integration...

David Cournapeau david@ar.media.kyoto-u.ac...
Tue Feb 5 04:23:21 CST 2008

Gael Varoquaux wrote:
> On Tue, Feb 05, 2008 at 09:15:29AM +0100, Sebastian Haase wrote:
>> Can ctypes do this ?
> No. Ctypes is only a way of loading C (and not C++) libraries in Python.
> That makes it very simple, but not very powerful.
I would not call ctypes not very powerful :) For sure you cannot do the 
same way as swig does, but you could imagine some automatic scheme to 
solve Sebastian's problem.

Typically, having a C wrapper automatically generated from the C++ 
headers, you could use the ctypes code generator, and you have something 
almost automatic (with a bit some boilerplate code in python, maybe).



More information about the Numpy-discussion mailing list