Re: [C++-sig] Boost::Python: inheritance + optional parameters

2012-04-27 Thread Jim Bosch
On 04/27/2012 10:38 AM, Sybren A. Stüvel wrote: Dear list, This is my first post here, so I'll briefly introduce myself. My name is Sybren and I'm a PhD student at the Utrecht University. We use Boost a lot in our C++-based framework, and naturally we use Boost::Python to create our Python bindi

[C++-sig] Boost::Python: inheritance + optional parameters

2012-04-27 Thread Sybren A . Stüvel
Dear list, This is my first post here, so I'll briefly introduce myself. My name is Sybren and I'm a PhD student at the Utrecht University. We use Boost a lot in our C++-based framework, and naturally we use Boost::Python to create our Python bindings. I want to combine two "features" that are doc

Re: [C++-sig] weak_ptr to this in C++ classes extended from python

2012-04-27 Thread Dave Abrahams
on Fri Apr 27 2012, Holger Brandsmeier wrote: > On Mon, Apr 23, 2012 at 20:48, Holger Brandsmeier wrote: >> In the meantime I figured out a different way of doing the shared >> pointer from this in python. Namely, to just make getThisRCP() a >> virtual function, add it to the Wrapper and to imp

Re: [C++-sig] Passing C++ object to script Python‏

2012-04-27 Thread Stefan Seefeld
On 04/27/2012 08:07 AM, Yoann Chaumy wrote: > > so, what should I do in the main to send an instance Personage to the > script Python ? Something like the following (assumes the Python interpreter is already properly initialized): void call_script(std::string const &script, Personage &p) { nam

[C++-sig] Passing C++ object to script Python‏

2012-04-27 Thread Yoann Chaumy
Hi, I have created a simple C++ class, and can successfully use in my python scripts. But my aim is to create a C++ instance, and pass it to my python script. The script will modify the instance and return it to the C++ application example : // example.h --

Re: [C++-sig] weak_ptr to this in C++ classes extended from python

2012-04-27 Thread Holger Brandsmeier
On Fri, Apr 27, 2012 at 08:22, Bryan Catanzaro wrote: > I think the problem is that aa is no longer an ExtendedA object, > because when you call ptr() it returns a pointer to the base C++ A > class, not the derived class. I think you got something confused. A boost::shared_pointer can very well b