Skip to content

Instantly share code, notes, and snippets.

@VictorVelarde
Created August 28, 2014 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VictorVelarde/d76ba9d72667ed7c44fa to your computer and use it in GitHub Desktop.
Save VictorVelarde/d76ba9d72667ed7c44fa to your computer and use it in GitHub Desktop.
ESRI - Mostrar descripción de campos de una tabla o entidad. ArcGIS 10.1
import arcpy
def pprint_fields(table):
""" pretty print table's fields and their properties """
def _print(l):
print("".join(["{:>12}".format(i) for i in l]))
atts = ['name', 'aliasName', 'type', 'baseName', 'domain',
'editable', 'isNullable', 'length', 'precision',
'required', 'scale',]
_print(atts)
for f in arcpy.ListFields(table):
_print(["{:>12}".format(getattr(f, i)) for i in atts])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment