GetInstallInfo

Zusammenfassung

The GetInstallInfo function returns a dictionary that contains information on the installation.

Syntax

GetInstallInfo ()
Rückgabewert
DatentypErklärung
Dictionary

The function returns a dictionary containing the properties of the installation.

KeysValues

BuildNumber

The build number

InstallDate

Date of installation

InstallDir

Installation location

InstallTime

Time of installation

InstallType

The installation type (or NA)

Installer

Account installed by

LicenseLevel

The current license level (Basic, Standard, Advanced)

ProductName

Product installed (Desktop, Server, Engine, ArcGISPro)

SPBuild

Service pack build (or NA)

SPNumber

Service pack build number (or NA)

SourceDir

Source directory

Version

The product version

The GetInstallInfo dictionary object keys

Codebeispiel

GetInstallInfo example

Return installation information.

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 example 2

Return the product version.

import arcpy
print(arcpy.GetInstallInfo()['Version'])

Verwandte Themen


In diesem Thema