import gtk, gobject

for key, val in filter(lambda keyval: isinstance(keyval[1], gobject.GEnum), gtk.__dict__.items()):
    try:
            type(val)(int(val))
            print '\t%s ok'%key
    except:
            print '%s, type %s, value %d, cannot reproduce itself'%(key, type(val), int(val))
