[C++-sig] iterate through boot::python::list
harold fellermann
harold at imb-jena.de
Tue Mar 11 15:23:34 CET 2003
hello,
>> Is there any possibility to iterate trough a boost::python::list (or
>> dictionary)
>> from within C++ ? I could not find anything in the documentation.
> Well, for a list you can call x.attr("__len__")() to get its length
> and index it.
how can I convert the return type list.attr("__len__") from
boost::python::api::proxy<boost::python::api::const_attribute_policies>
to size_t?
will it then be possible to reach the elements of the list via
'list[index]'
or how can this be done?
thanks,
- harold -
--
Live in a world of your own.
But always welcome visitors.
--
More information about the Cplusplus-sig
mailing list