<?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: Syntax Error: Older Version of Python Causing Problems in IDLE? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/syntax-error-older-version-of-python-causing/m-p/235298#M18276</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Since you're using forward slashes in your strings, don't make them raw strings (lose the leading 'r')&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;r"C:\Temp" = "C:\\Temp" = "C:/Temp"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Apr 2013 15:52:20 GMT</pubDate>
    <dc:creator>BruceNielsen</dc:creator>
    <dc:date>2013-04-17T15:52:20Z</dc:date>
    <item>
      <title>Syntax Error: Older Version of Python Causing Problems in IDLE?</title>
      <link>https://community.esri.com/t5/python-questions/syntax-error-older-version-of-python-causing/m-p/235295#M18273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Attempting to run a script with IDLE to fix some broken data links in an mxd.&amp;nbsp; Keep getting this syntax error message, then IDLE highlights the "7" in red as seen in the pic:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]23564[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it has something to do with the fact that I had a previous version of python/IDLE on my machine.&amp;nbsp; I have since removed it and reinstalled everything, but keep getting the syntax error message.&amp;nbsp; Would like this script to work in IDLE before moving to other IDE options.&amp;nbsp; Ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 00:29:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/syntax-error-older-version-of-python-causing/m-p/235295#M18273</guid>
      <dc:creator>DamonOsbourne</dc:creator>
      <dc:date>2013-04-17T00:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error: Older Version of Python Causing Problems in IDLE?</title>
      <link>https://community.esri.com/t5/python-questions/syntax-error-older-version-of-python-causing/m-p/235296#M18274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Post your code. From what little I can see in the screenshot, your import statement lacks commas between the modules you want to import.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 06:01:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/syntax-error-older-version-of-python-causing/m-p/235296#M18274</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2013-04-17T06:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error: Older Version of Python Causing Problems in IDLE?</title>
      <link>https://community.esri.com/t5/python-questions/syntax-error-older-version-of-python-causing/m-p/235297#M18275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, this is what I've got. The error message, though, seems to reflect that header version.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Type "copyright", "credits" or "license()" for more information&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy.mapping as mapping&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; mxd = mapping.MapDocument(r"c:/GIS/python/Broken.mxd")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; mxd.findAndReplaceWorkspacePaths(r"c:/GIS/python/Old/Trucks.gdb",r"c:/GIS/python/New/Trucks.gdb")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; mxd.saveACopy(r"c:/GIS/python/Fixed.mxd")&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 11:47:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/syntax-error-older-version-of-python-causing/m-p/235297#M18275</guid>
      <dc:creator>DamonOsbourne</dc:creator>
      <dc:date>2013-04-17T11:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error: Older Version of Python Causing Problems in IDLE?</title>
      <link>https://community.esri.com/t5/python-questions/syntax-error-older-version-of-python-causing/m-p/235298#M18276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Since you're using forward slashes in your strings, don't make them raw strings (lose the leading 'r')&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;r"C:\Temp" = "C:\\Temp" = "C:/Temp"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 15:52:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/syntax-error-older-version-of-python-causing/m-p/235298#M18276</guid>
      <dc:creator>BruceNielsen</dc:creator>
      <dc:date>2013-04-17T15:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error: Older Version of Python Causing Problems in IDLE?</title>
      <link>https://community.esri.com/t5/python-questions/syntax-error-older-version-of-python-causing/m-p/235299#M18277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ahhh I think I see your problem... It looks like you are trying to run text copied from the interactive python shell as a script. This won't work. You need to delete all the python shell stuff, eg Python 2.7.2 etc... and &amp;gt;&amp;gt;&amp;gt;. and just run the actual commands.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy.mapping as mapping mxd = mapping.MapDocument("c:/GIS/python/Broken.mxd") mxd.findAndReplaceWorkspacePaths("c:/GIS/python/Old/Trucks.gdb","c:/GIS/python/New/Trucks.gdb") mxd.saveACopy("c:/GIS/python/Fixed.mxd")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 21:03:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/syntax-error-older-version-of-python-causing/m-p/235299#M18277</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2013-04-17T21:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error: Older Version of Python Causing Problems in IDLE?</title>
      <link>https://community.esri.com/t5/python-questions/syntax-error-older-version-of-python-causing/m-p/235300#M18278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;YES, that was it!&amp;nbsp; Works great now thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 00:53:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/syntax-error-older-version-of-python-causing/m-p/235300#M18278</guid>
      <dc:creator>DamonOsbourne</dc:creator>
      <dc:date>2013-04-18T00:53:06Z</dc:date>
    </item>
  </channel>
</rss>

