- Original Message -
> From: "Jim Bosch"
> To: "Development of Python/C++ integration"
> Sent: Thursday, February 6, 2014 2:51:59 PM
> Subject: Re: [C++-sig] returning list of class pointers that compare equal
>
> On Thu, Feb 6, 2014
ic bool params_equal(Param &left, Param &right)
{
return &left == &right;
}
and then in the exposer:
Param_exposer.def("__eq__", ¶ms_equal);
--
Gary Oberbrunner
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
https://mail.python.org/mailman/listinfo/cplusplus-sig
ifferent, and don't
have operator== to compare their referents (at least that's my guess about
what's going on). Is there something else I can use instead of bp::ref here
that will cause the list items to "point to" the same param ea
rked at all.
Whoa, that is cool! I had no idea boost python could do this. Thanks, Stefan!
(It's like "python-ception": python calls C++ which calls python...)
--
Gary Oberbrunner
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
https://mail.python.org/mailman/listinfo/cplusplus-sig
least I think I
should be able to - but I'm not sure how far the boost.python world goes).
--
Gary Oberbrunner
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
https://mail.python.org/mailman/listinfo/cplusplus-sig
- Original Message -
> From: "Stefan Seefeld"
> To: "Development of Python/C++ integration"
> Sent: Tuesday, January 21, 2014 10:45:52 AM
> Subject: Re: [C++-sig] create a python object from scratch in boost.python?
>
> On 01/21/2014 10:37 AM,
;
}
return effect_list;
}
So now it returns a python list of python dicts. All I want now is to override
__getattr__ on each ppinfo dict so it returns the dict value as the attribute
value, so in python I can reference effect_list[i].name instead of
effect_list[i]['name']. O
- Original Message -
> From: "Neal Becker"
> To: cplusplus-sig@python.org
> Sent: Monday, January 20, 2014 8:39:55 PM
> Subject: Re: [C++-sig] create a python object from scratch in boost.python?
>
> Gary Oberbrunner wrote:
>
> > I'd like to c
tead but the python side would like to see attributes with values rather
than a dict.)
--
. . . . . . . . . . . . . . . . . . . . . .
Gary Oberbrunner ga...@genarts.com
VP Engineering Tel: 617-492-2888
GenArts, Inc. www.genarts.com
__
t
> blocks.
Thanks Jim; if that's happening, something on the python side must be eating
that exception, because I don't see it there. Still, this is a complex piece
of code so it's entirely possible it is being swallowed on the python side.
I'll co
_name(cpp_args)
That's exactly what I'm trying to figure out! The c++ exception gets handled
in handle_exception and it never gets turned into a python exception as far as
I can tell.
--
Gary Oberbrunner
___
Cplusplus-sig mailing list
Cpluspl
there is all this logic
in the boost::python call framework to build nice error messages about which
overloads were tried, but that message never comes out anywhere.
--
Gary Oberbrunner
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
https://mail.python.org/mailman/listinfo/cplusplus-sig
since my function never gets called (the argument error is detected by
boost.python). What ends up happening is it just silently fails.
What can I hook up so I (or my users) can see the argument error messages? And
ideally convert those into python exceptions?
This is all Win7, Python2.7.
--
. . . .
I recently posted an issue on StackOverflow about some Py++-generated code that
didn't seem to work. The question is at
http://stackoverflow.com/questions/19461274/.
Simply, I have these classes:
struct classA {
int intval;
unsigned int bitfield_member:1;
};
struct Collection {
classA *
Hi folks; I hope someone can help with a problem I'm having.
I have Base and Other classes (sorry for the generic names), and Base contains
a fixed-length const array of pointers to Others. I'm trying to expose Base to
python. I started with a pyplusplus run and hand-massaged the result, so it
about exporting
that particular field to python; can I tell pyplusplus to ignore it somehow?
That struct does get used lots of other places though, if that matters.
--
. . . . . . . . . . . . . . . . . . . . . .
Gary Oberbrunner ga...@genarts.com
VP Engineering Tel: 617-492-2888
GenArts, Inc. www.genarts.com
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
https://mail.python.org/mailman/listinfo/cplusplus-sig
SCons FTW! :-)
I built from source and tried it all again with bjam; no luck, same problems.
So I figured, how hard can it be, it's just a DLL after all (renamed to .pyd).
And sure enough it's not that hard. Here's a SConstruct that builds the
tutorial example, wherever it is (does not have to
g") but I guess extending is
similar, just make a DLL project and rename the output or something maybe?
--
Gary Oberbrunner
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
https://mail.python.org/mailman/listinfo/cplusplus-sig
on at this point.
I did download the source distribution, but it doesn't have a Jamfile in its
root dir either. Maybe I have to unpack it and run b2 to get that... I guess
I'll try that next.
--
Gary Oberbrunner
___
Cplusplus-sig mailing list
C
newbie questions come from not doing that.
In any case, I can use bjam to build and test the tutorial example when it's
inside the boost tree, but not when I move it outside -- I feel like I must be
missing something simple.
--
Gary Oberbrunner
_
> hi,
>
> have you placed user-config.jam in your %HOMEDRIVE%%HOMEPATH%
> location, and configured Python inside it, e.g.
>
> using msvc : 10.0 : : ;
>
> using python
> : 2.7 #version
> : D:/Python27 # cmd-or-prefix
> : D:/Libs/Python273/include #includes
&
odules
C:\local\boost_1_54_0\tools\build\v2/kernel/bootstrap.jam:139: in boost-build
from module
C:\tmp\tutorial\boost-build.jam:1: in module scope from module
What else do I need to add, or what am I doing wrong?
thanks,
-- Gary Oberbrunner
___
Cpluspl
22 matches
Mail list logo