Re: [C++-sig] How to handle argument error exceptions in boost.python?

2014-01-10 Thread Charly Bicker
Dear Gary, I am not sure if this is what you want, but what about writing a wrapper function around EXTrender_effect which takes boost::python::objects and then use boost::python::extract to check if you can convert the objects you got to what they should be (cf. https://wiki.python.org/moin/boost

Re: [C++-sig] Extending classes

2012-12-07 Thread Charly Bicker
le. -Holger On Fri, Dec 7, 2012 at 2:22 PM, Charly Bicker wrote: > Dear all, > > currently, I am revisiting an problem I had with my project some time ago: > due to several external constraints, I need to do some work if certain member > functions of my classes are called from pyt

[C++-sig] Extending classes

2012-12-07 Thread Charly Bicker
Dear all, currently, I am revisiting an problem I had with my project some time ago: due to several external constraints, I need to do some work if certain member functions of my classes are called from python. Initially, I put the additional code in the wrappers which were exposed with boost::

Re: [C++-sig] More inheritance problems

2012-09-05 Thread Charly Bicker
Dear Holger, thank you for your reply! > Why is that needed? > >>> t = testInheritance.Third(testInheritance.Derived()) > her in reality an instance of DerivedWrapper is created, and then > passed to C++. When you then do `t.get_base()` and instance of > DerivedWrapper will be returned (there is

[C++-sig] More inheritance problems

2012-09-04 Thread Charly Bicker
Dear all, first of all thanks to Holger for pointing me to a workaround with the add_static_property problem! Unfortunately, I already ran into the next problem, which seems very weird to me: I have again my old friends Base and Derived, with the obvious inheritance (source file attached). No

[C++-sig] Inheriting static overloaded properties

2012-09-04 Thread Charly Bicker
Dear all, I am working in the following scenario: I have a class "Derived" which inherits from "Base" and wrappers for both. Both have their own static debug flag and getters and setters for it (see code at the end of the mail). I try to use ".add_static_property" to make the debug flags visibl