<?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 Python Script - Accepting RAW_Input when run in Toolbox in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-script-accepting-raw-input-when-run-in/m-p/1029290#M60051</link>
    <description>&lt;P&gt;I have a simple Python script that accepts a Y/N response from the user before proceeding:&lt;/P&gt;&lt;P&gt;When I run it in PyScripter or Idle it's functioning as expected.&amp;nbsp; &amp;nbsp;I'd like to import it into a toolbox and have the user run it From ArcCatalog.&lt;/P&gt;&lt;P&gt;When I do that I'm getting the following error:&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;Traceback (most recent call last):&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;File "\\nq-cluster1\Share-APPL\GISAppl\Data Distribution Updates\DistributeAgData\ExtractAgData3_1.py", line 37, in &amp;lt;module&amp;gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;includeapps = raw_input("Include Ag Applicants? (Y or N):")&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;EOFError: EOF when reading a line&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;Failed to execute (Script).&lt;BR /&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;Failed at Mon Feb 22 15:11:30 2021 (Elapsed Time: 0.16 seconds)&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;What do I need to do to configure ArcCatalog to show the input prompt to accept Y/N?&lt;/P&gt;</description>
    <pubDate>Mon, 22 Feb 2021 20:14:47 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-02-22T20:14:47Z</dc:date>
    <item>
      <title>Python Script - Accepting RAW_Input when run in Toolbox</title>
      <link>https://community.esri.com/t5/python-questions/python-script-accepting-raw-input-when-run-in/m-p/1029290#M60051</link>
      <description>&lt;P&gt;I have a simple Python script that accepts a Y/N response from the user before proceeding:&lt;/P&gt;&lt;P&gt;When I run it in PyScripter or Idle it's functioning as expected.&amp;nbsp; &amp;nbsp;I'd like to import it into a toolbox and have the user run it From ArcCatalog.&lt;/P&gt;&lt;P&gt;When I do that I'm getting the following error:&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;Traceback (most recent call last):&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;File "\\nq-cluster1\Share-APPL\GISAppl\Data Distribution Updates\DistributeAgData\ExtractAgData3_1.py", line 37, in &amp;lt;module&amp;gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;includeapps = raw_input("Include Ag Applicants? (Y or N):")&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;EOFError: EOF when reading a line&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;Failed to execute (Script).&lt;BR /&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;Failed at Mon Feb 22 15:11:30 2021 (Elapsed Time: 0.16 seconds)&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;What do I need to do to configure ArcCatalog to show the input prompt to accept Y/N?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 20:14:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-accepting-raw-input-when-run-in/m-p/1029290#M60051</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-02-22T20:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Accepting RAW_Input when run in Toolbox</title>
      <link>https://community.esri.com/t5/python-questions/python-script-accepting-raw-input-when-run-in/m-p/1029292#M60052</link>
      <description>&lt;P&gt;So this is a script tool?&amp;nbsp; Any parameters need to be specified with arcpy.GetParameterAsText() or similar, and configured in the script tool properties.&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/setting-script-tool-parameters.htm" target="_blank"&gt;Setting script tool parameters—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;#tool input parameter
#the (0) index is the first parameter of the tool
includeapps = arcpy.GetParameterAsText(0)

#logical test against argument
if includeapps == 'Y':
    blah blah blah&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 22 Feb 2021 20:27:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-accepting-raw-input-when-run-in/m-p/1029292#M60052</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-02-22T20:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Accepting RAW_Input when run in Toolbox</title>
      <link>https://community.esri.com/t5/python-questions/python-script-accepting-raw-input-when-run-in/m-p/1029297#M60053</link>
      <description>&lt;P&gt;This is correct. You'll need to add a parameter to your script tool that will present this input to the user in the geoprocessing tool window. If you &lt;STRONG&gt;specify the parameter data type as Boolean&lt;/STRONG&gt;, it should show up as a simple check box.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 20:40:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-accepting-raw-input-when-run-in/m-p/1029297#M60053</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2021-02-22T20:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script - Accepting RAW_Input when run in Toolbox</title>
      <link>https://community.esri.com/t5/python-questions/python-script-accepting-raw-input-when-run-in/m-p/1029307#M60054</link>
      <description>&lt;P&gt;Thank you both. I've got to get better at figuring those type of things out. It was very simple. But when I don't know the solution it sometimes seems like a vast amount of information I have to search through to find the right answer. Hence I ask what ends up being a simple question with a simple answer. Thanks again.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 21:27:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-accepting-raw-input-when-run-in/m-p/1029307#M60054</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-02-22T21:27:23Z</dc:date>
    </item>
  </channel>
</rss>

