racheski

Help with Python Script

Discussion created by racheski on Feb 25, 2012
Latest reply on Feb 27, 2012 by racheski
I am new to Python and have been getting the same error every time I try to run this script:

... import arcpy
... arcpy.env.workspace = ???Z:\Robins_Stuff\CleanData\KDS_ByMonth.gdb???
... rasters = arcpy.ListRasters()
... extension = "_contours"
... for raster in rasters:
...      r = arcpy.Raster(raster)
...      r0 = r.mean
...      r1 = r.standardDeviation
...      r2 = r.mean + (r.standardDeviation * 2.33)
...      arcpy.ContourList(r, str(r) + extension, [r2])
... 
Parsing error <type 'exceptions.SyntaxError'>: invalid syntax (line 2)
>>> 


I have tried reversing the direction of the slashes already.  Help would be much appreciated!

Robin

Outcomes