Created
August 28, 2014 10:35
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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