Skip to content

Instantly share code, notes, and snippets.

@hwidlund
Created May 1, 2016 22:01
Show Gist options
  • Select an option

  • Save hwidlund/065dd4f0b8d4a9663c0199b6db4e9926 to your computer and use it in GitHub Desktop.

Select an option

Save hwidlund/065dd4f0b8d4a9663c0199b6db4e9926 to your computer and use it in GitHub Desktop.
Snippet to use string format to examine ArcGIS feature class fields
import arcpy
source ="path/to/featureclass"
srcFlds = arcpy.ListFields(source)
for field in srcFlds:
print("{0} type = {1} length = {2}".format(field.name, field.type, field.length))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment