Running Python scripts from the command line

Up to this point in the book, all your Python scripts have been run as either script tools in ArcGIS or from a Python development environment. The Windows command prompt provides yet another way of executing your Python scripts. The command prompt is used primarily to execute scripts that will be run as a part of a batch file and/or as scheduled tasks.

Getting ready

There are a couple of advantages to running Python geoprocessing scripts from the command prompt. These scripts can be scheduled to batch process your data during off hours for more efficient processing, and they are easier to debug due to the built-in Python error handling and debugging capabilities.

In this recipe, you will learn how to ...

Get Programming ArcGIS 10.1 with Python Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.