Describe 函数将返回所有 Describe 对象的以下属性。
示例代码:
import arcpy
# Create a Describe object
#
desc = arcpy.Describe("C:/Data/chesapeake.gdb")
# Print some Describe Object properties
#
if hasattr(desc, "name"):
print("Name: " + desc.name)
if hasattr(desc, "dataType"):
print("DataType: " + desc.dataType)
if hasattr(desc, "catalogPath"):
print("CatalogPath: " + desc.catalogPath)
# Examine children and print their name and dataType
#
print("Children:")
for child in desc.children:
print("\t%s = %s" % (child.name, child.dataType))