GetInstallInfo
汇总
返回包含有关安装信息的字典。
语法
GetInstallInfo()
返回值
| 数据类型 | 说明 |
|---|---|
|
Dictionary |
包含安装属性的字典。 字典中的关键字如下:
|
代码示例
GetInstallInfo 示例
获取安装信息。
import arcpy
# Use the dictionary iteritems to iterate through the key/value pairs from
# GetInstallInfo.
d = arcpy.GetInstallInfo()
for key, value in list(d.items()):
# Print a formatted string of the install key and its value
print("{:<13} : {}".format(key, value))
GetInstallInfo 示例 2
获取产品版本。
import arcpy
print(arcpy.GetInstallInfo()['Version'])