I am very new to Python and scripting and am trying to write script to delete any point feature classes in my .gdb. I have found an example, but can't get it to run. Your help is greatly appreciated.
arcpy.env.workspace = r"E:\GIS_255\Week5\Harmon_Wk5_GIS255\KingCounty.gdb"
fcList = arcpy.ListFeatureClasses("","point", "")
for fc in fcList:
Lst = arcpy.Describe(fc)
if string.lower(Lst.shapeType) == "point":
print str(fc) + " is a " + Lst.shapeType + " feature class"
print str(fc) + "The shapetype is unknown"
print "Script failed"
# Set local variables
inFeatures = "points"
outFeatures = r"E:\GIS_255\Week5\Harmon_Wk5_GIS255\output.gdb\new_points"
tempLayer = "pointsLayer"
expression = arcpy.AddFieldDelimiters(pointsLayer, "Point_ID") + " = 'busstop'" + " = 'bridges'"
# Execute CopyFeatures to make a new copy of the feature class
# Execute MakeFeatureLayer
# Execute SelectLayerByAttribute to determine which features to delete
# Execute GetCount and if some features have been selected, then
# execute DeleteFeatures to remove the selected features.
if arcpy.GetCount_management(tempLayer) > 0:
except Exception, e:
# If an error occurred, print line number and error message
import traceback, sys
tb = sys.exc_info()
print "Line %i" % tb.tb_lineno