Thomas Berg wrote:
> bp::scope sc(main);
> bp::def("function", myfunction, "function helpstring");
Now that looks interesting. I'll implement that and let you know if it
leads to any further problems. But it sounds like the perfect solution.
> Found this out by reading the source
On Thu, Jun 25, 2009 at 6:31 AM, Nicolas Lara wrote:
> Hello,
>
> I'm having trouble trying to override a method on a class exposed to
> Python. I cannot modify the original class, so I need to wrap it to
> change the behaviour of some methods to be Python compatible. The
> classes look like the fo
I tried adding:
implicitly_convertible();
implicitly_convertible();
but it doesn't appear to change anything. I would apreciate any idea
on thes regard.
Thanks again!
On Thu, Jun 25, 2009 at 3:31 AM, Nicolas Lara wrote:
> Hello,
>
> I'm having trouble trying to override a method on a class
Hello,
I'm having trouble trying to override a method on a class exposed to
Python. I cannot modify the original class, so I need to wrap it to
change the behaviour of some methods to be Python compatible. The
classes look like the following:
struct DocumentWrap : Document, wrapper
{
DocumentWr
That sounds great to me!
On Jun 24, 2009, at 5:03 PM, Gustavo Carneiro wrote:
I can't really fault your logic.
I just thought of something that makes some sense. If the wrapper
did something like:
_wrap_my_virtual_method (A &a)
{
PyA *py_A;
py_A = PyObject_New(PyA, &PyA_Type);
2009/6/25 J. Michael Owen
> I can see what you're worried about here, but as a practical matter it is
> very useful to be able to pass stuff by reference, and copying it under the
> hood will break code. For instance, if the virtual functions modify the
> state of the parameters passed by refere
I can see what you're worried about here, but as a practical matter it
is very useful to be able to pass stuff by reference, and copying it
under the hood will break code. For instance, if the virtual
functions modify the state of the parameters passed by reference it
will just not functio
2009/6/24 J. Michael Owen
> Hi again,
>
> I've run across another issue confusing me as I try to use pybindgen, in
> this case it's the treatment of reference parameters in virtual methods
> where you're allowing the class to be subclassed from python. It looks like
> the helper class that is ge
Hi again,
I've run across another issue confusing me as I try to use pybindgen,
in this case it's the treatment of reference parameters in virtual
methods where you're allowing the class to be subclassed from python.
It looks like the helper class that is generated is making copies of
pa
On Wed, Jun 24, 2009 at 10:26 PM, Christopher Schramm
wrote:
>
> > Thomas Berg wrote:
> >> bp::object function = bp::object(myfunction);
> >
> > Great! And it was that simple...
>
> But wait... Giving that a second thought I don't think that's going to
> exhaust bpy's full potential. At least
> Thomas Berg wrote:
>> bp::object function = bp::object(myfunction);
>
> Great! And it was that simple...
But wait... Giving that a second thought I don't think that's going to
exhaust bpy's full potential. At least I don't see a way to use it's
docstring handling or call policies.
I'll tes
Thomas Berg wrote:
> bp::object function = bp::object(myfunction);
Great! And it was that simple...
Thanks!
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
Hi,
On Wed, Jun 24, 2009 at 7:52 AM, Christopher Schramm
wrote:
>
> Stefan Seefeld wrote:
> > An alternative is not to use BOOST_PYTHON_MODULE at all, but set up
> > converters in ordinary C++ code. In the following I set up a Python
> > interpreter in my main application, inject a (C++) base cla
13 matches
Mail list logo