<?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: Why does python suck?: Discontinuity between codes and tools in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492535#M38586</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;within the help file code there is one salient line&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy.sa import *&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;was that included in your failed script?&amp;nbsp; Otherwise you may have to checkoutExtension if you aren't using an ArcInfo license&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Mar 2012 19:25:23 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2012-03-01T19:25:23Z</dc:date>
    <item>
      <title>Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492532#M38583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Community:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Why is it certain tasks fail in python, but plug the same data, same parameters into a tool, and it runs without issue? I'm partially looking for answers to some specific questions in this post, and partially looking for developers to improve this product.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to find some answers on this code I wrote this yesterday to do some basic tabulations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've commented to the right where in this code, python crashed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the essence of trying to find all the answers, I'll keep my code as messy as I wrote it (although I shortened pathnames-which might be an issue sometimes?):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;### System Tools import arcpy, os from arcpy.sa import * from arcpy import env, sa arcpy.CheckOutExtension("Spatial")&amp;nbsp; ### Declarations------------------------------- arcpy.env.overwriteOutput = True ### Definitions------------------------------------- ## areaTab1 = "X:\\DATA\\Temp.gdb\\trees11_ward_tab" areaTab2 = "X:\\DATA\\Temp.gdb\\trees06_ward_tab"&amp;nbsp; geog1_sub= "X:\\DATA\\Target_Geog.gdb\\WardPly" geog1= "X:\\DATA\\Temp.gdb\\WardPly_utm" cs= "C:\\Program Files (x86)\\ArcGIS\\Desktop10.0\\Coordinate Systems\\Projected Coordinate Systems\\UTM\\NAD 1983\\NAD 1983 UTM Zone 18N.prj"&amp;nbsp; Lc06 = "X:\\DATA\\C_2006\\LandCover_2006.img" trees06 = "X:\\DATA\\trees_06"&amp;nbsp; trees_in= "X:\\DATA\\Tree.gdb\\Tree_merged_022912" trees_vec= "X:\\DATA\\Tree.gdb\\Tree_merged_022912_1" trees_ras =&amp;nbsp; "X:\\DATA\\Tree.gdb\\Tree_raster_022912"&amp;nbsp;&amp;nbsp; ##Processes trees06 = Reclassify(Lc06, "Value", RemapValue([[0, "NODATA"], [1, 10], [2, "NODATA"], [3,"NODATA"], [4,"NODATA"], [5,"NODATA"],[6,"NODATA"], [7,"NODATA"]])) ##FAILED: Assuming code doesn't like .img- But, ran perfectly using Reclassify tool. trees06.save("X:\\DATA\\Working\\trees_06")&amp;nbsp;&amp;nbsp; arcpy.Project_management(geog1_sub, geog1, cs) # Ran successfully arcpy.FeatureClassToFeatureClass_conversion(trees_in, os.path.dirname(str(trees_in)), trees_vec) ## Making a backup copy of data: Failed. Ran in python after adding actual pathname. arcpy.AddField_management(trees_vec, "Ras", "SHORT") #Success arcpy.CalculateField_management(trees_vec, "Ras", 1) # Success arcpy.FeatureToRaster_conversion(trees_vec, "Ras", trees_ras, 1) # Success&amp;nbsp; TabulateArea(geog1, "OBJECTID", trees_in, "Value", areaTab1, 1) #FAILED: "Field OBJECTID does not exist". Um, yes it does, and tool ran fine using exact parameters from Tabulate Area tool. print "Tab 1 done" TabulateArea(geog1, "OBJECTID", trees06, "Value", areaTab2, 1)#FAILED: "Field OBJECTID does not exist". Um, yes it does, and tool ran fine using exact parameters from Tabulate Area tool. ## arcpy.JoinField_management(geog1, "OBJECTID", areaTab1, "OBJECTID", "VALUE_1") #This line failed first time through, then passed after restart. (?) arcpy.JoinField_management(geog1, "OBJECTID", areaTab2, "OBJECTID", "VALUE_10")# Succes ## FieldList = ["UTC11_Acres", "UTC11_Pct", "UTC06_Acres", "UTC06_Pct", "Chng_Acres", "Chng_Pct"] ## for field in FieldList: &amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddField_management(geog1, field, "DOUBLE")&amp;nbsp; rows = arcpy.UpdateCursor(geog1) for row in rows: &amp;nbsp;&amp;nbsp;&amp;nbsp; row.UTC11_Acres = (row.VALUE_1 * 0.0002471054) &amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row) &amp;nbsp;&amp;nbsp;&amp;nbsp; row.UTC11_Pct = (row.VALUE_1 / row.Shape_Area) * 100 &amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row) &amp;nbsp;&amp;nbsp;&amp;nbsp; row.UTC06_Acres = (row.VALUE_10 * 0.0002471054) &amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row) &amp;nbsp;&amp;nbsp;&amp;nbsp; row.UTC06_Pct = (row.VALUE_10 / row.Shape_Area) * 100 &amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row) &amp;nbsp;&amp;nbsp;&amp;nbsp; row.Chng_Acres = (row.UTC11_Acres - row.UTC06_Acres) &amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row) &amp;nbsp;&amp;nbsp;&amp;nbsp; row.Chng_Pct = (row.UTC11_Pct - row.UTC06_Pct) &amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row)&amp;nbsp; arcpy.DeleteField_management(geog1, ["VALUE_1", "VALUE_10"])&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Most of the issues I'm having and have had in the past are dealing with rasters. I've received some good feedback on how to deal with some issues, but are there things I can be doing differently to ease my woes?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to convince my boss that python is a lot more efficient than clicking or modeling in ModelBuilder. It's a hard sell when i have to restart a script 8 times to get it to run.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;General comments and specific resolutions are much appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 17:04:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492532#M38583</guid>
      <dc:creator>RichardThurau</dc:creator>
      <dc:date>2012-03-01T17:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492533#M38584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Run the Tabulate Area tool from ArcMap and in the results window right click and choose "Copy as python snippit." This will give you "perfect" syntax.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 17:54:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492533#M38584</guid>
      <dc:creator>ChrisMathers</dc:creator>
      <dc:date>2012-03-01T17:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492534#M38585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All the code here has been used successfully in other cases. Sometimes success comes from the Fail, save, restart, Pass cycle. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't used the snippet option very often. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wonder why the snippet code looks so different than the way Help describes how to write? For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Snippet:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.Reclassify_sa(Lc06, "Value","0 NODATA;1 10;2 NODATA;3 NODATA;4 NODATA;5 NODATA;6 NODATA;7 NODATA", trees06,"DATA")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code written from Help:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;trees06 = Reclassify(Lc06, "Value", RemapValue([[0, "NODATA"], [1, 10], [2, "NODATA"], [3,"NODATA"], [4,"NODATA"], [5,"NODATA"],[6,"NODATA"], [7,"NODATA"]])) 
trees06.save("X:\\DATA\\Working\\trees_06")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The snippet code fails, btw: "AttributeError: 'module' object has no attribute 'Reclassify_sa'" - I guess that's why the Help articles are there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll try using the suggestion in other cases though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:40:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492534#M38585</guid>
      <dc:creator>RichardThurau</dc:creator>
      <dc:date>2021-12-11T21:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492535#M38586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;within the help file code there is one salient line&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy.sa import *&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;was that included in your failed script?&amp;nbsp; Otherwise you may have to checkoutExtension if you aren't using an ArcInfo license&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 19:25:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492535#M38586</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2012-03-01T19:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492536#M38587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I wonder why the snippet code looks so different than the way Help describes how to write?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The snippet example used the string representation of the argument (this is what is returned BTW by getParameterAsText()), the example in the help uses python structures like lists. Both argument formats are supported. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the tool and modelbuilder, the GUI usally handles all this text-object conversion for you -- when you're scripting you need to be very careful how you format arguments so the tool will see the correct object representation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The snippet code fails, btw: "AttributeError: 'module' object has no attribute 'Reclassify_sa'"&amp;nbsp;&amp;nbsp; &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;I think this may be a bug in the copy as python snippet - as this syntax worked with 9.3 but won't work with 10.0. Most spatial analyst tools must be accessed &lt;A href="&amp;lt;/span&amp;gt;&amp;lt;a" target="_blank"&gt;using" rel="nofollow" target="_blank"&amp;gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00p600000002000000.htm]using&lt;/A&gt;&lt;SPAN&gt; Python map algebra in 10.0:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;arcpy.CheckOutExtension("spatial")&lt;BR /&gt;outgrid = arcpy.sa.Reclassify(...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;arcpy.CheckOutExtension("spatial")&lt;BR /&gt;from arcpy.sa import *&lt;BR /&gt;...&lt;BR /&gt;outgrid = Reclassify(..,)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'm trying to convince my boss that python is a lot more efficient than clicking or modeling in ModelBuilder. It's a hard sell when i have to restart a script 8 times to get it to run.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IMHO modelbuilder is a great macro tool for your work, but when you need to build a tool that needs full validation and documentation and error messages, python is the way to go.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 19:32:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492536#M38587</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2012-03-01T19:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492537#M38588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes Dan. I just commented out the reclassify line from the code I posted above and tried the snippet. arcpy.CheckOutExtension("Spatial") is listed too. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sounds like it is possible to write a reclassify in such a way? Seems to make more sense than the Help method, having to declare RemapRange or RemapValue and then saving the output. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RT&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 19:36:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492537#M38588</guid>
      <dc:creator>RichardThurau</dc:creator>
      <dc:date>2012-03-01T19:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492538#M38589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was having the same issue a week or so ago. One of the tests I ran was to print out my parameters which included path names. I had something similar to your path for the .img in that I had a folder called '2009' which contains integer values. I was getting weird print lines where the folder was, so I could tell that the path wasn't being read properly. I changed all my pathway parameters to raw string and they printed out fine, so in your case:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;Lc06 = r"X:\DATA\C_2006\LandCover_2006.img"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think when I set it up as a parameter, I set it to arcpy.GetparameterAsText() it was doing the raw string conversion for me, whereas you have to set it in idle. When I ran from idle, it crapped out until I changed to raw. This might be your issue. You might want to change the rest of your parameters to raw string as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 21:12:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492538#M38589</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2012-03-01T21:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492539#M38590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Honestly, I was pretty disgruntled when I started this post, but thanks to some great offerings I feel like I've learned a bit about what's happening. I'll be applying your suggestions a bit later today and report on the result. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For now, I just want to say Thanks for all your input!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2012 15:25:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492539#M38590</guid>
      <dc:creator>RichardThurau</dc:creator>
      <dc:date>2012-03-02T15:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492540#M38591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Richard,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's not Python that you should be angry at - it's Arcpy (i.e. the 'site-package' developed by ESRI that lets you use Python to access Arc functionality). Usually with programming languages if something goes wrong, it's the programmers fault (for making silly mistakes, etc.). However with Arcpy there are continual issues with data locks, odd/variable syntax, inconsistent function name capitalization, etc., etc., etc. These make it particularly hard to learn, and the documentation is not always the greatest...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2012 19:29:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492540#M38591</guid>
      <dc:creator>StacyRendall1</dc:creator>
      <dc:date>2012-03-02T19:29:24Z</dc:date>
    </item>
    <item>
      <title>Copy As Python Snippet bug (Spatial Analyst 10.0)</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492541#M38592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; I think this may be a bug in the copy as python snippet.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I contacted Esri Support and, sure enough:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You are correct the Copy As Python Snippet for the Con tool is not generating the correct syntax. I have submitted a software bug report on your behalf for this issue. The reference number and subject line for this bug is as follows:&lt;BR /&gt;[#NIM078805 The Spatial Analyst &amp;gt; Conditional &amp;gt; Con Python snippet from Results window uses incorrect syntax.]&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Mar 2012 13:58:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492541#M38592</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2012-03-03T13:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492542#M38593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Stacy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I absolutely agree and I should have described more specifically, where my emotional dissatisfaction is aimed. Coding is really a relief from the uncertainties that are inherent in windows computing. I work a lot with R and less with Python, but with both applications I know when something runs, it will deliver what it is supposed to, or I have to figure out where I screwed up :-j&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My gripes are with arcpy. But, i guess it does a lot, and generally the documentation available blows away anything else available. Certainly part of my problem is just not being a programmer, but a spatial analysis guy who is now trying to use arcpy for spatial analysis.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My goal is to start using open source python spatial analysis packages like GDAL/OGR. I just don't know if these will be more reliable or not. I'm guess so, mostly because of the things you've described in your previous post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Curtis, thanks for looking into that. I've heard 10.1 is getting some major arcpy reworking, so I'm curious to know how many of these issues might be corrected there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks everyone for your thoughts and comments. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Mar 2012 16:20:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492542#M38593</guid>
      <dc:creator>RichardThurau</dc:creator>
      <dc:date>2012-03-03T16:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492543#M38594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Richard,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have done a bit in GDAL/OGR (just with vectors) a few years ago. The documentation is appalling (it exists in full for C/C++ versions of GDAL/OGR, then sometimes there are bits at the bottom of the documentation page showing something similar in Python), although there is a pretty good community if you get stuck. Just remember to use &lt;/SPAN&gt;&lt;STRONG style="font-style: italic;"&gt;print dir()&lt;/STRONG&gt;&lt;SPAN&gt; all the time, to find out what methods are available for different objects. I think GDAL/OGR can sometimes be a bit faster overall (some of the processes may be similar speed or slower, but it is a lot quicker to load and basic things (opening files, etc.) are a hell of a lot faster. &lt;/SPAN&gt;&lt;A href="http://sgillies.net/blog"&gt;This guy has a blog&lt;/A&gt;&lt;SPAN&gt; that I referred to quite a lot when using it, and I'm hoping to share some of my GDAL/OGR experiences on my blog at some stage too. GDAL/OGR is a bit limiting as there is no support yet for File Geodatabases (ESRI only recently opened up the standard), so if you do vector stuff you have to use shapes or Personal Geodatabases or something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Stacy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Mar 2012 20:22:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492543#M38594</guid>
      <dc:creator>StacyRendall1</dc:creator>
      <dc:date>2012-03-03T20:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492544#M38595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Stacy, thanks a lot for the advice and info. I probably need to get my python in a little bit better form, but someday soon I'd like to be able to reduce my dependence on ESRI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All in all, using the raw directories seems to have reduced a lot of issues for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again to everyone for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 18:59:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492544#M38595</guid>
      <dc:creator>RichardThurau</dc:creator>
      <dc:date>2012-03-06T18:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492545#M38596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; My goal is to start using open source python spatial analysis packages &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;There's some really good stuff in R. And of course you can &lt;A href="&amp;lt;/span&amp;gt;&amp;lt;a" target="_blank"&gt;run" rel="nofollow" target="_blank"&amp;gt;http://rpy.sourceforge.net/]run&lt;/A&gt;&lt;SPAN&gt; R from Python.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;A href="&amp;lt;/span&amp;gt;&amp;lt;a" target="_blank"&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CRAN Task View: Analysis of Spatial Data&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 19:11:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492545#M38596</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2012-03-06T19:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492546#M38597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Big news - just found out that GDAL/OGR 1.9 is out, which&lt;/SPAN&gt;&lt;STRONG style="font-style: italic;"&gt; includes read/write for File Geodatabases&lt;/STRONG&gt;&lt;SPAN&gt;! Don't have time to test it right now, but I hope to give it a blast some time in the next few months...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are unsure about downloading/installing it (the Python site has the new version, but pretty indecipherable instructions), check out &lt;/SPAN&gt;&lt;A href="http://pythongisandstuff.wordpress.com/2011/07/07/installing-gdal-and-ogr-for-python-on-windows/"&gt;this&lt;/A&gt;&lt;SPAN&gt; post.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2012 19:32:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492546#M38597</guid>
      <dc:creator>StacyRendall1</dc:creator>
      <dc:date>2012-03-14T19:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492547#M38598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are installing GDAL remember that you have 32 bit python installed with ArcGIS. I didn't want to risk confusing Arc so I didn't attempt to install an additional 64 bit version. Also, Arc's python for me was 2.6.5, but the python bindings installer didn't see it. This had to do with being installed for "All Users" and Windows 7 only making a registry in Local_Machine and not Current_User. Just found the entries and exported to a reg file, opened in notepad, find/replace LOCAL_MACHINE with CURRENT_USER, save, write new file to registry. You'll have lots of python entries so you might have to google it if you run into this. Common problem to other python dependent software and windows 7.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 02:37:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492547#M38598</guid>
      <dc:creator>MichaelStead</dc:creator>
      <dc:date>2012-03-15T02:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492548#M38599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your tips Michael. I most often use two different PCs, one Windows 7 and one Windows XP, both have two versions of Python installed (Arc's 2.6.5 (x32) and 3.2.whatever (x64)) and both have the appropriate GDAL installed. However, you can only use one GDAL install at a time, as the GDAL PATH variable needs to be changed accordingly. Perhaps because my Windows 7 computer is a private one I have never had the issue you mentioned!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 20:48:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492548#M38599</guid>
      <dc:creator>StacyRendall1</dc:creator>
      <dc:date>2012-03-15T20:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492549#M38600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great, thanks for lowdown on GDAL. I'm hoping to have time to mess with it in a couple weeks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Curtis, the R stuff is awesome! I struggle to figure out how to manipulate data in Python like I can in R. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, right now I'm trying to figure out how to take a list of tables in a geodatabase and combine the contents into a single table. In R with common column names the command is rbind. In Python maybe I'd need to use vstack...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll likely start a new post for help with this one, but I'd be up for feedback either through python or Rpy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks everyone!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RT&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 03:54:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492549#M38600</guid>
      <dc:creator>RichardThurau</dc:creator>
      <dc:date>2012-03-19T03:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492550#M38601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;For example, right now I'm trying to figure out how to take a list of tables in a geodatabase and combine the contents into a single table. In R with common column names the command is rbind. In Python maybe I'd need to use vstack...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the tables are in a geodatabase already, why not just use the Merge tool? The field mapping object gives you an awful lot of extra functionality - for example, if the column names don't match you can build mappings.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 15:06:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492550#M38601</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2012-03-19T15:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why does python suck?: Discontinuity between codes and tools</title>
      <link>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492551#M38602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Curtis,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I actually ended using the Append command. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My poorly worded question is regarding how to move an arcpy object, like an attribute table, into an R object like a matrix, table, or dataframe. This is the missing link for me, since I feel pretty comfortable with R, but not so much with Python. It would be awesome to take a list of attribute tables, move them to R, manipulate the tables, then save them back as attribute tables again. Might be getting too complicated without a specific example which i do not have time to produce right now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your suggestion.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 20:55:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-python-suck-discontinuity-between-codes/m-p/492551#M38602</guid>
      <dc:creator>RichardThurau</dc:creator>
      <dc:date>2012-03-19T20:55:00Z</dc:date>
    </item>
  </channel>
</rss>

