logo       

Iterators on ListStore broken in pygtk 2.5.0 ?: msg#00134

gnome.gtk+.python

Subject: Iterators on ListStore broken in pygtk 2.5.0 ?

My latest development pygtk seems to have broken iterators on ListStore.
I'm using ubuntu hoary (read debian experimental/unstable) packages. I
can no longer iterate over a ListStore using for row in store.

The following code:

import gtk
print 'gtk version = ',gtk.gtk_version, 'pygtk version =
',gtk.pygtk_version

l = gtk.ListStore(str)
for n in range(10): l.append(["%s"%n])
print 'ListStore ',l,' has ',len(l), ' items.'
print "Let's try to print each item."
for n in l: print n[0]
print 'We should have just printed 0 through 9...'

Is giving me the following output:

gtk version = (2, 6, 0) pygtk version = (2, 5, 1)
ListStore <gtk.ListStore object (GtkListStore) at 0xb7313f54> has 10
items. Let's try to print each item.
We should have just printed 0 through 9...

Any idea what's going on?

Thanks for any help,
Tom
_______________________________________________
pygtk mailing list pygtk@xxxxxxxxxx
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise