GetInstallInfo (arcpyproduction)
摘要
Returns a data dictionary that contains information on the installation type properties for the current version of the Esri 制图和制表解决方案 software installed on a particular machine.
讨论
A Python developer sometimes needs to get the exact version of the Esri 制图和制表解决方案 software that is installed on a particular machine. This function returns a data dictionary of values, so you can limit your Python scripts to run only on a specific release of the software.
语法
数据类型 | 说明 | ||||||||||||||||||||||
Dictionary |
The function returns a data dictionary containing the properties of the installation.
|
代码实例
Return installation information.
import arcpyproduction
# Use the dictionary iteritems to iterate through
# the key/value pairs from GetInstallInfo
d = arcpyproduction.GetInstallInfo()
for key, value in d.iteritems():
# Print a formatted string of the install key and its value
#
print("{:<13} : {}".format(key, value))
Return the product version.
import arcpyproduction
print(arcpyproduction.GetInstallInfo()['Version'])