def classClip(myInput, myClip, outFeature, outTable): arcpy.Clip_analysis(myInput, myClip, outFeature) arcpy.AddField_management(outFeature, "ClipAcres", "Double", "", "", "", "", "NULLABLE", "NON_REQUIRED", "") arcpy.CalculateField_management(outFeature, "ClipAcres", "float(!SHAPE.AREA@ACRES!)", "PYTHON") arcpy.Statistics_analysis(outFeature, outTable, [["ClipAcres", "SUM"]], "AAClass")
Solved! Go to Solution.
#to import a custom module from a network import sys sys.path.append(r"\\snarf\am\div_lm\ds\gis\tools\scripts_toolboxes") import helper #script is helper.py that is in the scripts_toolboxes folder
def searchFiles(rootDir, wildcard = "*"): """Returns a list of files under rootDir that contain the wildcard search string""" fileList = [] if os.path.exists(rootDir) == False: print "ERROR: " + rootDir + " does not exist!" else: for dirPath, dirNames, fileNames in os.walk(rootDir, topdown=True): for file in fileNames: if fnmatch.fnmatch(file, wildcard) == True: fileList.append(dirPath + "\\" + file) return fileList