<?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 Variables in Python script: ArcCatalog vs. GPK in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/variables-in-python-script-arccatalog-vs-gpk/m-p/490814#M2451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;is there some way to make sure python scripts run in a 'strict' mode in regards to variables?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems that ArcCatalog/ArcMap is much more lenient with global variables, but when running the generated GPK inside my application all these errors popup because some variables are not defined correctly and thus the script fail.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can i somehow trigger ArcCatalog/ArcMap to already show these problems?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;example&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;test = "example"

def function():
&amp;nbsp; arcpy.AddMessage("test: " + test)
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;works in ArcCatalog but will fail in the GPK because you have to add&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;global test&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;within the function&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Feb 2014 12:55:42 GMT</pubDate>
    <dc:creator>BKuiper</dc:creator>
    <dc:date>2014-02-19T12:55:42Z</dc:date>
    <item>
      <title>Variables in Python script: ArcCatalog vs. GPK</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/variables-in-python-script-arccatalog-vs-gpk/m-p/490814#M2451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;is there some way to make sure python scripts run in a 'strict' mode in regards to variables?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems that ArcCatalog/ArcMap is much more lenient with global variables, but when running the generated GPK inside my application all these errors popup because some variables are not defined correctly and thus the script fail.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can i somehow trigger ArcCatalog/ArcMap to already show these problems?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;example&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;test = "example"

def function():
&amp;nbsp; arcpy.AddMessage("test: " + test)
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;works in ArcCatalog but will fail in the GPK because you have to add&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;global test&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;within the function&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 12:55:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/variables-in-python-script-arccatalog-vs-gpk/m-p/490814#M2451</guid>
      <dc:creator>BKuiper</dc:creator>
      <dc:date>2014-02-19T12:55:42Z</dc:date>
    </item>
  </channel>
</rss>

