Re: [C++-sig] Type converter not found for property

2013-05-08 Thread Wichert Akkerman
On May 8, 2013, at 23:31 , "Alex Leach" wrote: > That error means the type_id of uuid is not in the bp registry. > > I think you can fix this by deriving uuid_to_python from to_python_converter, > as demonstrated in the pytype_function example[1]. This will add the > get_pytype function call,

Re: [C++-sig] Type converter not found for property

2013-05-08 Thread Wichert Akkerman
On May 8, 2013, at 23:58 , Jim Bosch wrote: > On 05/08/2013 05:48 PM, Jim Bosch wrote: >> On 05/08/2013 04:33 PM, Wichert Akkerman wrote: >>> I am trying to expose a class with a boost::uuids::uuid member to Python. >>> The class is pretty simple: >>> >>> class Article { >>> public: >>> b

Re: [C++-sig] Type converter not found for property

2013-05-08 Thread Jim Bosch
On 05/08/2013 05:48 PM, Jim Bosch wrote: On 05/08/2013 04:33 PM, Wichert Akkerman wrote: I am trying to expose a class with a boost::uuids::uuid member to Python. The class is pretty simple: class Article { public: boost::uuids::uuid uuid; }; which is exposed like this: article

Re: [C++-sig] Type converter not found for property

2013-05-08 Thread Jim Bosch
On 05/08/2013 04:33 PM, Wichert Akkerman wrote: I am trying to expose a class with a boost::uuids::uuid member to Python. The class is pretty simple: class Article { public: boost::uuids::uuid uuid; }; which is exposed like this: article .def(init((arg("uuid"))) .def_r

Re: [C++-sig] Type converter not found for property

2013-05-08 Thread Alex Leach
That error means the type_id of uuid is not in the bp registry.I think you can fix this by deriving uuid_to_python from to_python_converter, as demonstrated in the pytype_function example[1]. This will add the get_pytype function call, and on initialisation, should hopefully add what's missing: a

[C++-sig] Type converter not found for property

2013-05-08 Thread Wichert Akkerman
I am trying to expose a class with a boost::uuids::uuid member to Python. The class is pretty simple: class Article { public: boost::uuids::uuid uuid; }; which is exposed like this: article .def(init((arg("uuid"))) .def_readwrite("uuid", &Article::uuid); and I have basic c

[C++-sig] boost::variant and boost::python::extract

2013-05-08 Thread Bryan Catanzaro
Hi - Using Boost 1.53.0, the following code fails to compile with g++, when c++11 is enabled: #include #include struct A{}; struct B{}; typedef boost::variant my_variant; void foo(boost::python::object o) { my_variant v = boost::python::extract(o); } The error is: /home/bcatanzaro/boost_