How to search through a gtk.ListStore in pyGTK and remove elements?
问题 I have the following code (where store is a gtk.ListStore and titer is a gtk.TreeIter . The docs say that if there is no next row, iter_next() will return None , hence the break when that is found. It is supposed to search through the ListStore of (int, str) and remove the one item whose int component matches item_id. while True: if store.get_path(titer)[0] == item_id: store.remove(titer) break else: titer = store.iter_next(titer) if titer is None: break However, if an element in the middle