--- David Abrahams <dave@boost-consulting.com> wrote:
harold fellermann <harold@imb-jena.de> writes:
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.
You can also do this: #include <boost/python/detail/api_placeholder.hpp> int l = boost::python::len(some_list_or_dict);
Nice project for someone who wants to make a contribution.
Expanding api_placeholder.hpp into a comprehensive solution constitutes another nice project for someone wanting to make a contribution. Ralf __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/