arcgis python ListEnvironments 函数可返回地理处理环境名称列表。
import arcpy environments = arcpy.ListEnvironments() # Sort the environment names environments.sort() for environment in environments: # Format and print each environment and its current setting. # (The environments are accessed by key from arcpy.env.) print("{0:<30}: {1}".format(environment, arcpy.env[environment]))