[C++-sig] new to python; old to C++

Gustavo Carneiro gjcarneiro at gmail.com
Sat Nov 1 22:15:38 CET 2008


2008/11/1 Alan Baljeu <alanbaljeu at yahoo.com>

> 2008/11/1 Greg Landrum <greg.landrum at gmail.com>
> <<<
> My opinion is biased, of course, but I use PyBindGen, usually with the help
> of pygccxml for automatic scanning.  I recommend PyBindGen for people that
> dislike the kind of C++ template abuse that boost.python does.  Of course I
> also recommend anyone starting with pybindgen to be aware of its
> limitations, namely lack of support for multiple inheritance and C++
> exceptions.
> >>>
>
> This is what attracts me to PyBindGen.  I dislike "template abuse", and my
> C++ doesn't use multiple inheritance or exceptions.  Any other limitations I
> should know?


See http://code.google.com/p/pybindgen/wiki/Features
And also the open bug reports: https://bugs.launchpad.net/pybindgen/+bugs

But even I don't know all the pybindgen limitations :P


>
>
> <<<
> pybindgen generated code also compiles fine with visual studio (or at least
> the unit test suite does).  You only need (py)gccxml for scanning code, not
> for generating.  And generated code does not require any library to compile.
>  And you can even skip (py)gccxml if you want API definitions "by hand", and
> this way depend only on pybindgen and python for code generation.  Finally,
> pybindgen is a small pure python module of which a copy can easily be
> included in the project itself ;-)
>
> http://pybindgen.googlecode.com/svn/trunk/apidocs/index.html
> >>>
> So you use gccxml as well. Does it make a big diff?


pybindgen has _one_ layer that uses gccxml for scanning, but it is optional;
use it if you like, or don't.

I think gccxml scanning is important for large APIs which have a tendency to
change over time.  If you have a small and mostly static API then it should
be OK to just manually write the API definition by hand (in a Python-based
IDL).  Otherwise it becomes tedious to do it by hand.

-- 
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20081101/aaf0ad8a/attachment-0001.htm>


More information about the Cplusplus-sig mailing list