ListEnvironments
サマリ
The ListEnvironments function returns a Python list of geoprocessing environment names.
構文
ListEnvironments ({wild_card})
パラメータ | 説明 | データ タイプ |
wild_card |
ワイルドカードを使用して、返される結果を絞り込むことができます。ワイルドカードを指定しない場合は、すべての値が返されます。 # A wild_card of "*workspace" will return a list including the # workspace and scratchWorkspace environment names arcpy.ListEnvironments("*workspace") | String |
データ タイプ | 説明 |
String |
The Python List returned from the function containing the geoprocessing environment variable names, optionally limited by a wild card filter. |
コードのサンプル
ListEnvironments example
Lists the environment variable name and current value.
import arcpy import string environments = arcpy.ListEnvironments() # Sort the environment list, disregarding capitalization # environments.sort(key=string.lower) for environment in environments: # As the environment is passed as a variable, use Python's getattr # to evaluate the environment's value # envSetting = getattr(arcpy.env, environment) # Format and print each environment and its current setting # print "{0:<30}: {1}".format(environment, envSetting)
関連項目
7/10/2012