GetSystemEnvironment (arcpy)
サマリ
Gets the specified system environment variable value, such as "TEMP".
説明
When using GetSystemEnvironment to retrieve the "TEMP" environment variable's value, GetSystemEnvironment will cycle through "TEMP", "TMP" and "MW_TMPDIR" environment variables and return the first value it finds.
構文
GetSystemEnvironment (environment)
パラメータ | 説明 | データ タイプ |
environment |
The name of the system environment variable. | String |
データ タイプ | 説明 |
String |
Returns the value of the specified system environment variable as a string. |
コードのサンプル
GetSystemEnvironment example
Return the specified system environment variable value.
import arcpy
# Set the scratchWorkspace environment to the value returned
# from the system environment variable TEMP
arcpy.env.scratchWorkspace = arcpy.GetSystemEnvironment("TEMP")
関連トピック
4/26/2014