Using C++ and ctypes together: a vast conspiracy? ;)

Diez B. Roggisch deets at nospam.web.de
Wed Jun 3 04:19:59 EDT 2009


A. Cavallo schrieb:
> Mmmm, 
> not really a conspiracy but it is not that trivial....
> 
> In wrapping c++ you might find useful the commands nm with c++filt
> although they work under linux there is the same pair for every platform 
> (under windows I remember there is objdump): they should only you need to wrap 
> a c++ library.
> 
> I've been wrapping in the past c++ using boost and it was trivial although I 
> haven't tried enough to break it.
> 
> swig, in older versions, is really bad: I can't comment on newer versions but 
> I'd have a look to the generated code before using it.
> 
> sip it looks quite difficult to use, but is well maintained.

I don't think it's (more) difficult. It's just stripping down the 
c++-header-file for the easy cases,providing explicit type-marshalling 
code for complex arguments, and potentially writing explicit 
method/function-bodies for certain hard cases.

All of this is done pretty much alike in boost.

Diez



More information about the Python-list mailing list