import types tdict = { "BufferType" : "" , "BuiltinFunctionType" : "" , "BuiltinMethodType" : "" , "ClassType" : "" , "CodeType" : "" , "ComplexType" : "" , "DictProxyType" : "" , "DictType" : "" , "DictionaryType" : "" , "EllipsisType" : "" , "FileType" : "" , "FloatType" : "" , "FrameType" : "" , "FunctionType" : "" , "GeneratorType" : "" , "InstanceType" : "" , "IntType" : "" , "LambdaType" : "" , "ListType" : "" , "LongType" : "" , "MethodType" : "" , "ModuleType" : "" , "NoneType" : "" , "ObjectType" : "" , "SliceType" : "" , "StringType" : "" , "TracebackType" : "" , "TupleType" : "" , "TypeType" : "" , "UnboundMethodType" : "" , "UnicodeType" : "" , "XRangeType" : "" ,} a = dir(types) #f = file("types.txt", "w") for z in a: if tdict.has_key(z): which = getattr(types, str(z)) if str(which) != str(tdict[z]): print "%s wrong, is %s, should be %s" % (z, which, tdict[z]) del tdict[z] print tdict #if which.__class__ == type(type): # f.write('"%s" : "%s" , ' % (z,str(which))) #f.close()