Solved! Go to Solution.
import arcpy from arcpy import env env.workspace = r"C:\temp\python\test.gdb" fc = "Airports" for field in arcpy.ListFields(fc): print field.name, field.type, field.length
import arcpy from arcpy import env env.workspace = r"C:\temp\python\test.gdb" fc = "Airports" for field in arcpy.ListFields(fc): print field.name, field.type, field.length
#Open output text file log = open('listfields.txt', 'w') for field in arcpy.ListFields(fc): print >> log, field.name, field.type, field.length log.close()