O'Reilly logo

Programming ArcGIS 10.1 with Python Cookbook by Eric Pimpler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. Automating Python Scripts

In this chapter, we will cover the following recipes:

  • Running Python scripts from the command line
  • Using sys.argv[] to capture command-line input
  • Adding Python scripts to batch files
  • Scheduling batch files to run at prescribed times

Introduction

Python geoprocessing scripts can be executed either outside ArcGIS as a standalone script or inside ArcGIS as a script tool. Both methods have their advantages and disadvantages. Up to this point in the book, all our scripts have been run either inside ArcGIS as a script tool, or from a Python development environment such as IDLE, or the Python Window in ArcGIS. However, Python scripts can also be executed from the Windows operating system command line. The command line ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required