[pygtk] gtk.TreeModelRowIter.next
Brian
dol-sen at telus.net
Wed May 17 21:33:02 WST 2006
On Tue, 2006-16-05 at 23:33 -0700, David M. Cook wrote:
> On Tue, May 16, 2006 at 10:54:40PM -0700, Brian wrote:
> > It says:
> >
> > When there are no more rows left the StopIteration exception is raised.
> >
> > But I can't find out any more about the StopIteration. ie. where is it
> > defined, where do you import it from. I can't find it in any of the
> > gtk.Constants, treeview, treemodel, etc..
>
> It's already loaded into __builtins__, so you don't have to import anything.
>
> dir(__builtins__)
>
> Dave Cook
Thank you everyone for the answer. At one point I thought it might be a
builtin, but was getting too frustrated not finding anything
(overtired). I see I should not have included gtk in my google search.
> If you're just trying to
> find out how to get the data sequencially from a model, this is how
> you do it:
>
> for row in model
>
> At least for gtk.ListStore, gtk.TreeStore is slightly trickier.
>
> Johan
It was a Treestore, but a ListStore is all that was needed. The next()
is the correct choice for this as the List is somewhat dynamic and could
change. It is part of a command queue to process.
--
Brian <dol-sen at telus.net>
More information about the pygtk
mailing list