[C++-sig] [Boost.Python] Wrapping C library functions
wingusr at gmail.com
Mon Feb 15 22:44:34 CET 2010
Doesn't the first example in The Boost.Python Tutorial
show it making a simple C function available to Python?
I want to be able to use the open source, Leptonica C Image Processing
Library (available at http::/leptonica.com) from Python, preferably
without having to make any changes to it. But again, handling the
PIX** parameter seems problematic.
I was hoping to avoid writing C++ wrapper classes (but Stefan
Seefeld's answer on this list) does have a nice short example of what
I would have to do.
Using SWIG was my last choice (well, the last choice is directly using
the C Api).
I have also looked at pybindgen, but Gustavo Carneiro tells me at
https://answers.launchpad.net/pybindgen/+question/101056 that it is
currently unable to easily handle parameters of the form SOMETYPE**.
Other options I will investigate are: ctypes, Cython, expy, and SIP
(the last only because the ultiate goal is to use Leptonica Image
Processing routines inside a PyQt-based app).
More information about the Cplusplus-sig