Re: Wrapping C++ Class Heirachy in Python

2005-04-19 Thread Andrew Wilkinson
Steve Juranich wrote: >> I've found the tp_base and tp_bases elements and I've set them to the >> base type object (and a tuple containing the base type object) before I >> call PyType_Ready but in Python the base class isn't recognised. Is there >> anything obvious I'm missing? > > Well, I can't

Re: Wrapping C++ Class Heirachy in Python

2005-04-18 Thread Skip Montanaro
Roy> I've been playing around with ctypes Roy> (http://starship.python.net/crew/theller/ctypes/) recently. So Roy> far, it looks pretty cool. Wrapping C++ libraries? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrapping C++ Class Heirachy in Python

2005-04-18 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Chris Smith <[EMAIL PROTECTED]> wrote: > > Diez B Roggisch <[EMAIL PROTECTED]> writes: > > >> PyType_Ready but in Python the base class isn't recognised. Is > >> there anything obvious I'm missing? > > > Maybe - I'd go for one of the several avail

Re: Wrapping C++ Class Heirachy in Python

2005-04-18 Thread Chris Smith
> Diez B Roggisch <[EMAIL PROTECTED]> writes: >> PyType_Ready but in Python the base class isn't recognised. Is >> there anything obvious I'm missing? > Maybe - I'd go for one of the several available python wrapper > generators. I personally had good experiences with SIP. But

Re: Wrapping C++ Class Heirachy in Python

2005-04-18 Thread Steve Juranich
On 4/18/05, Andrew Wilkinson <[EMAIL PROTECTED]> wrote: > I'm trying to wrap a C++ class hierarchy with Python types and I'd like to > maintain the hierarchy in the types. I'm fairly sure this is possible, > isn't it? Yes. > Are there any documents explaining how to do this, the standard Python >

Re: Wrapping C++ Class Heirachy in Python

2005-04-18 Thread Diez B. Roggisch
> PyType_Ready but in Python the base class isn't recognised. Is there > anything obvious I'm missing? Maybe - I'd go for one of the several available python wrapper generators. I personally had good experiences with SIP. But you might also try boost python or SWIG. The python C-API is great - f

Wrapping C++ Class Heirachy in Python

2005-04-18 Thread Andrew Wilkinson
Hi, I'm trying to wrap a C++ class hierarchy with Python types and I'd like to maintain the hierarchy in the types. I'm fairly sure this is possible, isn't it? Are there any documents explaining how to do this, the standard Python manual doesn't go into enough detail about creating types for this