<?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: How to exit a python script tool but keep the geoprocessing window open? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-exit-a-python-script-tool-but-keep-the/m-p/719060#M55698</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Luke! Why I didn't find that option?! That does exactly what I was looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have script validation in my script but there are a couple of still valid steps that would throw an error at a later stage whith an error message that my client would not understand &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Feb 2019 06:53:08 GMT</pubDate>
    <dc:creator>Nicole_Ueberschär</dc:creator>
    <dc:date>2019-02-18T06:53:08Z</dc:date>
    <item>
      <title>How to exit a python script tool but keep the geoprocessing window open?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-exit-a-python-script-tool-but-keep-the/m-p/719057#M55695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some preconditions to run my python script tool, for example that you have to create a local copy for editing first when using a hosted feature service layer. I can use exit() with an if statement (I also tried exit(0) and exit(1)) and it stops my script but it "pretends" to have ran succesfully which it did not (because I stopped it before proceeding). I would like to show the user a last message so he knows what he has to do before running the script again. Like the system error messages you find in that geoprocessing window but more helpful &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Feb 2019 22:31:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-exit-a-python-script-tool-but-keep-the/m-p/719057#M55695</guid>
      <dc:creator>Nicole_Ueberschär</dc:creator>
      <dc:date>2019-02-16T22:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to exit a python script tool but keep the geoprocessing window open?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-exit-a-python-script-tool-but-keep-the/m-p/719058#M55696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where is the script being run?&amp;nbsp; ArcMap? ArcGIS Pro? standalone script? some other place?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Feb 2019 22:48:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-exit-a-python-script-tool-but-keep-the/m-p/719058#M55696</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-02-16T22:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to exit a python script tool but keep the geoprocessing window open?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-exit-a-python-script-tool-but-keep-the/m-p/719059#M55697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can raise an&amp;nbsp;exception (or try &lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-functions/adderror.htm"&gt;arcpy.AddError&lt;/A&gt;) and the window will stay up. But you'd be better using &lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/creating-tools/understanding-validation-in-script-tools.htm"&gt;script validation&lt;/A&gt; to stop the script from running in the first place.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2019 06:08:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-exit-a-python-script-tool-but-keep-the/m-p/719059#M55697</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2019-02-17T06:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to exit a python script tool but keep the geoprocessing window open?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-exit-a-python-script-tool-but-keep-the/m-p/719060#M55698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Luke! Why I didn't find that option?! That does exactly what I was looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have script validation in my script but there are a couple of still valid steps that would throw an error at a later stage whith an error message that my client would not understand &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2019 06:53:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-exit-a-python-script-tool-but-keep-the/m-p/719060#M55698</guid>
      <dc:creator>Nicole_Ueberschär</dc:creator>
      <dc:date>2019-02-18T06:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to exit a python script tool but keep the geoprocessing window open?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-exit-a-python-script-tool-but-keep-the/m-p/719061#M55699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Luke already gave me the correct answer but to answer your question (and maybe to give a hint to other people reading this): I am running the script from a Script tool (from the toolbox) within ArcMap 10.6.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2019 06:54:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-exit-a-python-script-tool-but-keep-the/m-p/719061#M55699</guid>
      <dc:creator>Nicole_Ueberschär</dc:creator>
      <dc:date>2019-02-18T06:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to exit a python script tool but keep the geoprocessing window open?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-exit-a-python-script-tool-but-keep-the/m-p/719062#M55700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahh arcmap… in Pro, the geoprocessing dialog doesn't close and you can addmessage or error stuff, then 'view details'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2019 10:28:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-exit-a-python-script-tool-but-keep-the/m-p/719062#M55700</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-02-18T10:28:17Z</dc:date>
    </item>
  </channel>
</rss>

