ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

A quick tour of creating tools with Python

Geoprocessing system tools (those installed with ArcGIS) are designed to perform one small but essential operation on geographic data. Using ModelBuilder or Python, you execute these geoprocessing tools in a sequence, feeding the output of one tool to the input of another. The script you create may be an essential part of your workflow—a task you need to repeat again and again.

Scripts that you create can be executed with one of two basic methods: outside ArcGIS and within ArcGIS.

  • Outside ArcGIS means that the script is executed from the operating system command prompt, as shown below, or within a development application, such as PythonWin. Scripts executed in this manner are referred to as stand-alone scripts.

    Running a script from a cmd window.

    E:\ScriptLib>transform_data.py "e:\data\d052573
    
  • Within ArcGIS means you create a script tool inside a toolbox. A script tool is like any other tool—it can be opened and executed from the tool dialog box, used in models and the Python window, and called from other scripts and script tools. Script tool in Catalog window

Geoprocessing tools can be created from Python in two ways: standard toolboxes, (Toolbox) where you connect a Python script tool to a toolbox using a wizard, and Python toolboxes (Python Toolbox), which are an ASCII file written entirely with Python code. To learn more about the differences between custom and Python toolboxes, see Comparing custom and Python toolboxes.

Related topics

  • What is a script tool?
  • What is a Python toolbox?
  • Comparing custom and Python toolboxes
  • Understanding script tool parameters
  • Understanding validation in script tools
  • Understanding messages in script tools
  • Understanding the progress dialog box in script tools
  • What is ArcPy?
  • What is Python?

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal