from gi.repository import Gtk, GObject

TEST = 4


class Model(GObject.GObject, Gtk.TreeModel):

    __gtype_name__ = 'Model'

    def __init__(self):
        super(Model, self).__init__()

    def do_get_iter(self, path):
        iter_ = Gtk.TreeIter()
        print 'do_get_iter', path, id(iter_)
        iter_.stamp = 1
        t = tuple(path.get_indices())
        iter_.user_data = t
        return True, iter_

    def do_get_column_type(self, idx):
        print 'do_get_column_type'
        return int

    def do_get_value(self, iter_, col_idx):
        print "do_get_value"
        return 1


def main():
    store = Model()
    it = store.get_iter(Gtk.TreePath('0'))
    print store.get_value(it, 0)


if __name__ == '__main__':
    main()
