[pygtk] sorting a treeview/liststore

John Hunter jdhunter at ace.bsd.uchicago.edu
Wed Sep 6 22:39:06 WST 2006


>>>>> "John" == John Hunter <jdhunter at ace.bsd.uchicago.edu> writes:


        def sort0(liststore, iter1, iter2):
            val1 = model.get_value(iter1, 0)
            val2 = model.get_value(iter2, 0)
            print 'sort0', val1, val2, val1<val2
            return val1<val2

Skip Montanaro pointed out to me offlist that I should be using cmp.
This appears to fix my bug.

JDH


More information about the pygtk mailing list