<?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 SearchCursor won't reset? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/searchcursor-won-t-reset/m-p/657524#M51155</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to get my feet wet with Python but something has me stumped. I made a test feature class with just one object and used that to instantiate a cursor. I looped over the FC and told it to print some text each time, which it did. I then reset the cursor and tried doing the same thing again but nothing prints. This is how my code looks:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; rows = arcpy.SearchCursor("pyLateralLine") &amp;gt;&amp;gt;&amp;gt; for row in rows: ...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "something"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone think of what I'm doing wrong here? Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Aug 2012 21:25:58 GMT</pubDate>
    <dc:creator>RobertMartin2</dc:creator>
    <dc:date>2012-08-13T21:25:58Z</dc:date>
    <item>
      <title>SearchCursor won't reset?</title>
      <link>https://community.esri.com/t5/python-questions/searchcursor-won-t-reset/m-p/657524#M51155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to get my feet wet with Python but something has me stumped. I made a test feature class with just one object and used that to instantiate a cursor. I looped over the FC and told it to print some text each time, which it did. I then reset the cursor and tried doing the same thing again but nothing prints. This is how my code looks:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; rows = arcpy.SearchCursor("pyLateralLine") &amp;gt;&amp;gt;&amp;gt; for row in rows: ...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "something"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone think of what I'm doing wrong here? Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 21:25:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/searchcursor-won-t-reset/m-p/657524#M51155</guid>
      <dc:creator>RobertMartin2</dc:creator>
      <dc:date>2012-08-13T21:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: SearchCursor won't reset?</title>
      <link>https://community.esri.com/t5/python-questions/searchcursor-won-t-reset/m-p/657525#M51156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Calling &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;.reset()&lt;/SPAN&gt;&lt;SPAN&gt; is sketchy as best (it doesn't work on certain storage formats), you'll want to create a new &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;SearchCursor &lt;/SPAN&gt;&lt;SPAN&gt;object pointing to the same data.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 21:37:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/searchcursor-won-t-reset/m-p/657525#M51156</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2012-08-13T21:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: SearchCursor won't reset?</title>
      <link>https://community.esri.com/t5/python-questions/searchcursor-won-t-reset/m-p/657526#M51157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
rows = arcpy.SearchCursor("pyLateralLine")
for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "something"
del row
del rows
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:49:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/searchcursor-won-t-reset/m-p/657526#M51157</guid>
      <dc:creator>BruceBacia</dc:creator>
      <dc:date>2021-12-12T03:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: SearchCursor won't reset?</title>
      <link>https://community.esri.com/t5/python-questions/searchcursor-won-t-reset/m-p/657527#M51158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;maybe you could try the del row,rows ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 18:26:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/searchcursor-won-t-reset/m-p/657527#M51158</guid>
      <dc:creator>BruceBacia</dc:creator>
      <dc:date>2012-08-14T18:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: SearchCursor won't reset?</title>
      <link>https://community.esri.com/t5/python-questions/searchcursor-won-t-reset/m-p/657528#M51159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you elaborate? Which storage formats don't work with .reset()?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 15:56:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/searchcursor-won-t-reset/m-p/657528#M51159</guid>
      <dc:creator>PriscillaCole</dc:creator>
      <dc:date>2016-03-03T15:56:45Z</dc:date>
    </item>
  </channel>
</rss>

