<?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 cursor in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/cursor/m-p/37447#M2931</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cursor = gp.SearchCursor(tabela1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for row in iter(cursor.Next, None):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.CalculateField_management(A_XYOSIE, row.exp_in, row.expression, "PYTHON", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Calculate- ",row.expression," do",row.exp_in&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "end"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The script calculates the fields in the FC based in the separate table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;How to convert this script to use only cursor?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the&amp;nbsp; CalculateField not working for unknown reasons to me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Mar 2011 09:28:04 GMT</pubDate>
    <dc:creator>BartłomiejStaroń</dc:creator>
    <dc:date>2011-03-18T09:28:04Z</dc:date>
    <item>
      <title>cursor</title>
      <link>https://community.esri.com/t5/python-questions/cursor/m-p/37447#M2931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cursor = gp.SearchCursor(tabela1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for row in iter(cursor.Next, None):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.CalculateField_management(A_XYOSIE, row.exp_in, row.expression, "PYTHON", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Calculate- ",row.expression," do",row.exp_in&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print "end"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The script calculates the fields in the FC based in the separate table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;How to convert this script to use only cursor?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the&amp;nbsp; CalculateField not working for unknown reasons to me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2011 09:28:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cursor/m-p/37447#M2931</guid>
      <dc:creator>BartłomiejStaroń</dc:creator>
      <dc:date>2011-03-18T09:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: cursor</title>
      <link>https://community.esri.com/t5/python-questions/cursor/m-p/37448#M2932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The expression is stored in a field in the feature class? Thats a little odd. Ive never seen this 'iter(cursor.Next, None):' before. Thats a neat use of iter. We should have been doing that all along instead of while loops. Anyway, it sounds like youre going to have to convert the expression to a function some how. I suggest trying to lambda a function from the expression field, but since youre expression is probably a string Im really not sure how that would work. Can you provide a line from the table just so we can see what we are dealing with?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2011 12:19:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cursor/m-p/37448#M2932</guid>
      <dc:creator>ChrisMathers</dc:creator>
      <dc:date>2011-03-21T12:19:33Z</dc:date>
    </item>
  </channel>
</rss>

