Python Binding

Stefan Behnel stefan.behnel-n05pAM at web.de
Tue May 8 13:00:37 EDT 2007


STiAT wrote:
> Why do you all suggest other things than the way suggested by python?

Because going to Paris is not the only way to get french bread?

Why would you want to write all that ugly glue code by hand that Pyrex
generates for free? Module descriptors? Class descriptors? Method descriptors?
Reference counting? That's what Pyrex saves you from. Honestly.

>From what I read in your mail, that's exactly the kind of thing you're having
trouble with. Wouldn't you prefer concentrating on your real code instead?


> I havn't got a real problem writing the code in C, actually, it looked
> as if it would give me several possibilities i wouldn't have with
> pyrex (like binding more library functions to one provided python
> function and so on).

No idea what you mean in your parentheses, but I don't think there are many
"possibilities" you "wouldn't have with Pyrex".

We used Pyrex to write lxml, a wrapper around the huge API of libxml2 and
libxslt. It's some 11000 lines of Pyrex code by now, but the generated C code
is some 67000 lines in total. Even if it's somewhat verbose and generic in
places, I wouldn't have wanted to write that by hand.

Stefan



More information about the Python-list mailing list