I just want to walk down a file system and print out what GIS data are present; nothing fancy for right now.
import arcpy
import os
workspace=R"C:\Users\MeMyself\Data"
walk = arcpy.da.Walk(workspace)
Print(walk)
but this doesn't work to print out this tuple... I get <Workspace Walker object object at 0x000001FF12CC7F00>
So the tuple "walk" exists... I can do a Type(walk) on it, type is <class 'Workspace Walker object'> but how do I print it out so I can read it?
Thanks.
Solved! Go to Solution.
If you want to see the first tuple (it is common to have more than one tuple):
print(next(walk))
Take a closer look at the online help page. Like other arcpy tools, this one creates an Object, and you have to tease the properties out of that object to make sense of it. The help page gives a good example of mixing arcpy along with the os module in python to get what you are after.