[C++-sig] iterate a boost::python::list
Andrea Bedini
andrea.bedini at gmail.com
Fri May 22 11:50:56 CEST 2009
On Thu, May 21, 2009 at 11:08 PM, Hans Roessler <hansroessler at yahoo.de>wrote:
>
> How can I iterate in C++ over a boost::python::list?
you can use stl_input_iterator:
stl_input_iterator<T> begin(o), end;
gives you a pair of stl compatible iterators assuming you can extract type T
from objects obtained by iterating over o.
see
http://www.boost.org/doc/libs/1_39_0/libs/python/doc/v2/stl_iterator.html
--
Andrea Bedini <andrea.bedini at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20090522/ce452123/attachment.htm>
More information about the Cplusplus-sig
mailing list