[C++-sig] Announcing pybindgen

Gustavo Carneiro gjcarneiro at gmail.com
Wed Sep 26 14:48:39 CEST 2007


(manually replying from copy-pasting the archives because my c++-sig
subscription was disabled by accident).

Nat Goodspeed wrote:

>Gustavo Carneiro wrote:
>>   Hello all,
>>
>>   I'd like to announce a new project for producing python extensions,
>> called PyBindGen.  It follows a radical new path for Python bindings
>> generation: it is itself written in (gasp!) Python!  And it does not
>> even use C++ templates at all! :-)
>Interesting! I would be curious to see you contrast it with the Py++
>project:
>
>http://www.language-binding.net/pyplusplus/pyplusplus.html
>
>to get a sense of when I might choose to use one vs. the other.

I know Py++.  You cannot compare Py++ with PyBindGen.  I would say that
PyBindGen replaces Boost.Python.  Py++ is a layer on top of Boost.Python.
Py++ generates Boost.Python module definition sources through automatic
scanning of C++ header files.  PyBindGen lacks the header files scanning
feature that Py++ provides, and I really miss that feature in PyBindGen.  I
hope that someone (maybe me) finds time to work on that for PyBindGen, some
day...  I'm not sure if Py++ is modular enough to be able to receive a
different code generation backend besides Boost.Python (Roman, feel free to
comment :).

Although I like Py++ a lot, I really hate Boost.Python.  Maybe it's because
of my lack of skill in understanding C++ templates, but I feel like
Boost.Python hides too many details underneath a layer of cryptic to follow
set of C++ templates, while I need to see the generated code in order to
check that memory management details are being declared and implemented
correctly.  In addition, to compile Boost.Python based bindings your users
need to have the boost python library and header files installed.  In
contrast, PyBindGen generated extensions only require python development
header files in order to compile, nothing more.  I also think
Boost.Pythonextensions compile to rather large modules...

Regards,

-- 
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/20070926/9cce45cf/attachment.htm>


More information about the Cplusplus-sig mailing list