<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Newbie - trying to do something simple with arcpy.da.walk in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/newbie-trying-to-do-something-simple-with-arcpy-da/m-p/1090909#M62133</link>
    <description>&lt;P&gt;If you want to see the first tuple (it is common to have more than one tuple):&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print(next(walk))  &lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 20 Aug 2021 18:50:17 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2021-08-20T18:50:17Z</dc:date>
    <item>
      <title>Newbie - trying to do something simple with arcpy.da.walk</title>
      <link>https://community.esri.com/t5/python-questions/newbie-trying-to-do-something-simple-with-arcpy-da/m-p/1090891#M62131</link>
      <description>&lt;P&gt;I just want to walk down a file system and print out what GIS data are present; nothing fancy for right now.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;import&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;​&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;import&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;os&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;​&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;workspace=R"C:\Users\MeMyself\Data"&lt;/SPAN&gt;&lt;SPAN&gt;​&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;walk =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;arcpy.da.Walk(workspace)&lt;/SPAN&gt;&lt;SPAN&gt;​&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;​&lt;/SPAN&gt;&lt;SPAN&gt;Print(walk)&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but this doesn't work to print out this tuple... I get&amp;nbsp;&lt;STRONG&gt;&amp;lt;Workspace Walker object object at 0x000001FF12CC7F00&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So the tuple "walk" exists... I can do a Type(walk) on it, type is&amp;nbsp;&amp;lt;class 'Workspace Walker object'&amp;gt; but how do I print it out so I can read it? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 18:11:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/newbie-trying-to-do-something-simple-with-arcpy-da/m-p/1090891#M62131</guid>
      <dc:creator>PeterWang</dc:creator>
      <dc:date>2021-08-20T18:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie - trying to do something simple with arcpy.da.walk</title>
      <link>https://community.esri.com/t5/python-questions/newbie-trying-to-do-something-simple-with-arcpy-da/m-p/1090908#M62132</link>
      <description>&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/walk.htm" target="_blank"&gt;Walk—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;has code examples&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 18:47:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/newbie-trying-to-do-something-simple-with-arcpy-da/m-p/1090908#M62132</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-08-20T18:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie - trying to do something simple with arcpy.da.walk</title>
      <link>https://community.esri.com/t5/python-questions/newbie-trying-to-do-something-simple-with-arcpy-da/m-p/1090909#M62133</link>
      <description>&lt;P&gt;If you want to see the first tuple (it is common to have more than one tuple):&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print(next(walk))  &lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 20 Aug 2021 18:50:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/newbie-trying-to-do-something-simple-with-arcpy-da/m-p/1090909#M62133</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-08-20T18:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie - trying to do something simple with arcpy.da.walk</title>
      <link>https://community.esri.com/t5/python-questions/newbie-trying-to-do-something-simple-with-arcpy-da/m-p/1090915#M62134</link>
      <description>&lt;P&gt;Take a closer look at the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/walk.htm" target="_self"&gt;online help page&lt;/A&gt;.&amp;nbsp; 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.&amp;nbsp; The help page gives a good example of mixing arcpy along with the os module in python to get what you are after.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 18:57:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/newbie-trying-to-do-something-simple-with-arcpy-da/m-p/1090915#M62134</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-08-20T18:57:24Z</dc:date>
    </item>
  </channel>
</rss>

