Re: [C++-sig] Converting existing C++ data to python using Boost.Python

2011-11-10 Thread Wojciech Mamrak
Thank you Dave, > If you get the python method into a boost::python::object, you can just > do: > > boost::python::object the_target > the_target.attr("the_method")(foo); > >> Obviously I need to create a Python version of this object. > > Boost.Python can handle that for you behind the scenes

Re: [C++-sig] Converting existing C++ data to python using Boost.Python

2011-11-10 Thread Dave Abrahams
on Thu Nov 10 2011, Wojciech Mamrak wrote: > Hello, > > I am aware about the possibility to register converters to- and from- > Python, which enable the implicit conversions between user-defined and > build-in types in Python. > My question is different: Is it possible to use Boost.Python to > c

[C++-sig] Converting existing C++ data to python using Boost.Python

2011-11-10 Thread Wojciech Mamrak
Hello, I am aware about the possibility to register converters to- and from- Python, which enable the implicit conversions between user-defined and build-in types in Python. My question is different: Is it possible to use Boost.Python to convert existing data structures from C++ to Python? Simple