On 01/10/2010 12:36 PM, devin kelly wrote:
So I have to make something to do this conversion. This is where I'm
stuck now, I think I have to do something like this
BOOST_PYTHON_MODULE(vector_indexing_suite_ext){
boost::python::class_<std::vector<double> >("PyVec")
.def(boost::python::vector_indexing_suite<std::vector<double>
>());
}
Is this all I need? Do I need to define __getitem__ ? If this is all
I need how do I use it in main()?
You presumably use it just like any other conversion you have defined.
Have you looked at
http://www.boost.org/doc/libs/1_41_0/libs/python/doc/v2/indexing.html,
and tried it out ? Reading the docs is typically the best way to get
started...
Also does anyone know of any good resources for embedding in boost.python?
This list is a good place to ask questions, for anything not covered by
the (online) docs. (We may even improve the docs if it turns out
something important isn't covered.)
Stefan
--
...ich hab' noch einen Koffer in Berlin...
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig