David Cournapeau wrote:

> Carl Friedrich Bolz wrote:
>> Neal Becker wrote:
>>> [...]
>>>>> Indeed. But there are tools to generate most of the painful code:
>>>>> Swig, boost::python, and others.
>>>>> With Swig, you can even subclass C++ classes and override virtual
>>>>> methods in python.
>>>>> I wish pypy could do the same.
>>>> Both methods involve parsing C++, which is not fun. For example,
>>>> concerning wxwidget, I for once think it would be much easier to wrap
>>>> gtk than wxwidget (if we think: would be good to have a GUI lib for
>>>> pypy); incidently, that's how pygtk is generated (some python + scheme
>>>> code generate the pygtk wrapper around gtk).
>>>>
>>> boost::python does not involve parsing c++.
>>
>> yip, it does. The compiler parses C++, after all :-).
>>
>> nitpickingly-yours,
> You are not nitpicking at all: boost::python uses Py++, which uses
> gccxml to parse the C++. There is no way around it: since it is
> extremely difficult to interoperate with any C++ ABI, you need to
> interoperate at the source level, parsing the monstruosity that C++ is
> compared to C.
> 
No.  You can use py++ if you like to generate boost::python.  This (py++) is
fairly new, and I believe relatively few boost::python users follow this
route.  Most of us write boost::python wrappers by hand (it's usually
pretty easy).

_______________________________________________
[email protected]
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to