GetInstallInfo (arcpy)

Resumen

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

Sintaxis

GetInstallInfo ()
Valor de retorno
Tipo de datosExplicación
Dictionary

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

Keys

Values

SourceDir

Source directory

InstallDate

Date of installation

SPBuild

Service pack build (or N/A)

ProductName

Product installed (Desktop, Server, Engine)

BuildNumber

The build number

InstallType

The installation type (or N/A)

Version

The product version

SPNumber

Service pack build number (or N/A)

Installer

Account installed by

InstallDir

Install location

InstallTime

Time of installation

GetInstallInfo's dictionary object keys

Ejemplo de código

GetInstallInfo example

Return installation information on the ArcGIS for Desktop installation.

import arcpy

# Use the dictionary iteritems to iterate through 
#   the key/value pairs from GetInstallInfo
for key, value in arcpy.GetInstallInfo("desktop").iteritems:
    # Print a formatted string of the install key and its value
    #
    print "%-13s: %s" % (key, value)

Temas relacionados

9/11/2013