ListEnvironments
Resumen
The ListEnvironments function returns a list of geoprocessing environment names.
Sintaxis
ListEnvironments({wild_card})
| El parámetro | Explicación | Tipo de datos |
|---|---|---|
|
wild_card |
Limits the results returned. If a value is not specified, all values are returned. The wildcard is not case sensitive. Use an asterisk (*) to represent zero or more characters. For example, |
String |
Valor de retorno
| Tipo de datos | Explicación |
|---|---|
|
String |
The list returned from the function containing the geoprocessing environment names, optionally limited by the |
Muestra de código
ListEnvironments example
Lists the environment variable name and current value.
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]))