<?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: Python Field Calculate issue in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-field-calculate-issue/m-p/141795#M11023</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Stick an r in front of !HYPERLINK! to tell it to parse it as a raw string instead of a normal string where backslashes are considered special characters.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Aug 2011 19:25:07 GMT</pubDate>
    <dc:creator>LoganPugh</dc:creator>
    <dc:date>2011-08-12T19:25:07Z</dc:date>
    <item>
      <title>Python Field Calculate issue</title>
      <link>https://community.esri.com/t5/python-questions/python-field-calculate-issue/m-p/141794#M11022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to use python inside of ArcMap to perform a field calculation. I am attempting to replace one word with another in my hyperlink field. My issue is that when I run the field calculator it replaces the words correctly, but it also changes the '\0' into little squares or question marks. I have tried using code blocks and writing the syntax differently but I keep getting the same result. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \\\\\\this is some example data\\\\\\\&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;\\gis1\GIS\Projects\Water\MidlandGTG\MidlandCity\Valves\Sec. 07\07-019.pdf&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;\\gis1\GIS\Projects\Water\MidlandGTG\MidlandCity\Valves\Sec. 07\07-020.pdf&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;\\gis1\GIS\Projects\Water\MidlandGTG\MidlandCity\Valves\Sec. 07\07-021.pdf&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;\\gis1\GIS\Projects\Water\MidlandGTG\MidlandCity\Valves\Sec. 07\07-022.pdf&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;\\gis1\GIS\Projects\Water\MidlandGTG\MidlandCity\Valves\Sec. 07\07707-002.pdf&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; !HYPERLINK!.replace("Projects","Data") //////this is the code I used//////&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2011 18:13:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-field-calculate-issue/m-p/141794#M11022</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-08-12T18:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Python Field Calculate issue</title>
      <link>https://community.esri.com/t5/python-questions/python-field-calculate-issue/m-p/141795#M11023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Stick an r in front of !HYPERLINK! to tell it to parse it as a raw string instead of a normal string where backslashes are considered special characters.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2011 19:25:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-field-calculate-issue/m-p/141795#M11023</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2011-08-12T19:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Python Field Calculate issue</title>
      <link>https://community.esri.com/t5/python-questions/python-field-calculate-issue/m-p/141796#M11024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Stick an r in front of !HYPERLINK! to tell it to parse it as a raw string instead of a normal string where backslashes are considered special characters.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Either that or you can add another backslash where you currently have single backslashes.&amp;nbsp; The backslash \ character is the escape character in Python strings.&amp;nbsp; To get a backslash in a string you have to escape then backslash, so single string backslashes have to be converted to double backslashes in order for the actual string to have only one backslash character.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ex: The string "C:\Python.exe" will cause errors since you don't want an escape P character (whatever that is).&amp;nbsp; Convert the string to "C:\\Python.exe" and the actual string stored will have just the single backslash as you want.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Aug 2011 01:41:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-field-calculate-issue/m-p/141796#M11024</guid>
      <dc:creator>KentWilliams</dc:creator>
      <dc:date>2011-08-13T01:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Python Field Calculate issue</title>
      <link>https://community.esri.com/t5/python-questions/python-field-calculate-issue/m-p/141797#M11025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Stick an r in front of !HYPERLINK! to tell it to parse it as a raw string instead of a normal string where backslashes are considered special characters.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Awesome, thanks!! That did the trick.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; So is there a way to mark this issue solved?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2011 13:05:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-field-calculate-issue/m-p/141797#M11025</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-08-15T13:05:19Z</dc:date>
    </item>
  </channel>
</rss>

