Boost logo

Boost :

From: Philippe Vaucher (philippe.vaucher_at_[hidden])
Date: 2007-07-25 03:55:22

FWIW, I think the boost::python doc really lack small example of simple
things, like:

1) How am I supposed to iterate over boost::python::object::operator[] ?
2) How am I supposed to iterate over boost::python::object::attr() ?

After googling a lot I found out that for 2) I could do :

boost::python::dict = boost::python::extract<boost::python::dict>(obj.attr
boost::python::object it = dict.iterkeys();
   // use boost::python::extract<yourtype>(it()) here

But to find that out I really had to sweat. And I'm still looking for 1)...
and not close to find out because few people embed python into C++.

Boost list run by bdawes at, gregod at, cpdaniel at, john at