Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Script ending at loop

$
0
0
I'm having an issue getting a loop to run in my map. Something as simple as just trying to print "yay" won't iterate. Here's what I have to even a test that I can't get to run. Am I missing something?

Code:

mxd = arcpy.mapping.MapDocument("Current")
mapLyr1 = arcpy.mapping.ListLayers(mxd, "sampleLayer") [0]
cursor = arcpy.SearchCursor(mapLyr1)
for row in cursor:
        print "yay"


Viewing all articles
Browse latest Browse all 2485

Trending Articles