O'Reilly logo

Introducing Geographic Information Systems with ArcGIS: A Workbook Approach to Learning GIS, 3rd Edition by Michael D. Kennedy

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

Modify the Python Script from the Gold Model
____ 20. Modify the Python Script: In the text of the script you will find comments consisting of dashed lines. After the second set of such lines type the command
print “Beginning execution of Gold_Model script”
This command causes the text within quotation marks to appear on the screen when the program begins execution—just to reassure you that something is happening. (This script can take two or three minutes to run; all you will see is a blank screen unless you mark the beginning in some way.) You might also put a similar print command at the end of the program.
____ 21. The more important modification is to tell Python to overwrite existing files. You will find a command early in the script that says “import arcpy”, which brings the ArcGIS version of Python into play. On the next line after this, you should enter, exactly as shown:
arcpy.env.overwriteOutput = True
Save the Python script (Ctrl+S). Close ArcCatalog and ArcMap if either is or both are open.

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