Essential ArcPy vocabulary

This document introduces some vocabulary that is essential to understanding the ArcPy help.

TermDefinition

Python

Python is an open source programming language that was conceived in the late 1980s by Guido van Rossum and introduced in 1991. Python is supported by a growing and varied user community and provides easy readability, clean syntax, dynamic typing, and an extensive collection of standard and third-party libraries.

Learn more about Python in ArcGIS Pro

ArcPy

ArcPy (often referred to as the ArcPy site package) provides Python access for all geoprocessing tools, including extensions, as well as a wide variety of useful functions and classes for working with and interrogating GIS data. Using Python and ArcPy, you can develop an infinite number of useful programs that operate on geographic data.

Learn more about ArcPy

ArcPy modules

A module is a Python file that generally includes functions and classes. ArcPy is supported by the following modules:

ArcPy classes

A class is analogous to an architectural blueprint. The blueprint provides the framework for how to create something. Classes can be used to create objects, often referred to as an instance. ArcPy classes, such as the SpatialReference and Extent classes, are often used as shortcuts to complete geoprocessing tool parameters that would otherwise have a more complicated string equivalent.

ArcPy functions

A function is a defined bit of functionality that does a specific task and can be incorporated into a larger program.

In ArcPy, all geoprocessing tools are provided as functions, but not all functions are geoprocessing tools. In addition to tools, ArcPy provides a number of functions to better support geoprocessing Python workflows. Functions (often referred to as methods) can be used to list certain datasets, retrieve a dataset's properties, validate a table name before adding it to a geodatabase, or perform many other useful scripting tasks.

Stand-alone Python script

A stand-alone Python script is a .py file that can be executed from the operating system prompt, or a Python Integrated Development Environment (IDE).

Python script tool

A Python script tool is a Python script that has been added to a geoprocessing toolbox. Once added as a script tool, the script tool becomes like any other geoprocessing tool—it can be opened and executed from the tool dialog box, used in the Python window and ModelBuilder, and called from other scripts and script tools.

Python window

The Python window is a convenient place to use Python from within ArcGIS to interactively run geoprocessing tools and functionality as well as take advantage of other Python modules and libraries. This window also provides a gateway for you to learn Python.

The Python window can be used to execute a single line of Python code, with the resulting messages printed to the window. It is a useful place to experiment with syntax and work with short lengths of code and provides an opportunity to test your ideas outside a larger script.

Python toolbox

Python toolboxes are geoprocessing toolboxes that are created entirely in Python. A Python toolbox and the tools contained within look, act, and work like toolboxes and tools created in any other way.

A Python toolbox is a Python file with a .pyt extension that defines a toolbox and one or more tools.

Verwandte Themen