You are completely right wihtin this. It's some time i didn't reply, but i've taken a look on pyrex and swig now which did cost me some time, and they really make it easier. SWIG provides more possibilities and bindings for other languages too, though - i must say i've been faster with pyrex, for some reason it fits me better.
I'd like to use swig, but for some reason i've troubles defining a completely new type, so a type which is not a wrapper type, but a type provided to python. Kind regards, Georg Stefan Behnel wrote: > 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 -- http://mail.python.org/mailman/listinfo/python-list