import arcpy inFeature = arcpy.GetParameterAsText(0) #原始数据 try: fieldList = arcpy.ListFields(inFeature) for field in fieldList: arcpy.AddMessage("{0} is a type of {1} with a length of {2}" .format(field.name, field.type, field.length)) except Exception,e: print e.message();