<?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 running slower in PyScripter than with IDLE in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60509#M4832</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Up until recently we used the IDLE interface to write and then run Python scripts for ArcGIS. I had PyScripter (PyScripter v2.5.3 32-bit version) installed on my workstation which is a Windows7 64-bit machine. I am running ArcGIS 10.0 SP3 and the Python version is 32-bit; below is the first line when opening the IDLE program that came with the ArcGIS installation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Post installation I noticed several versions of PyScripter IDE to choose from in the Start menu: PyScripter for Python 2.4 thru 3.3, and also one for 'Latest Version'. I assumed that the 2.6 version was the best one to use as from the above message in IDLE, it seems our Python version is 2.6.5. I have noticed that when running Python scripts from inside PyScripter they run much slower (5 times slower) than when running the same program from either a DOS command prompt or the IDLE program. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thought as to why this may be occurring?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Mar 2013 12:47:07 GMT</pubDate>
    <dc:creator>BillBass</dc:creator>
    <dc:date>2013-03-27T12:47:07Z</dc:date>
    <item>
      <title>Python script running slower in PyScripter than with IDLE</title>
      <link>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60509#M4832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Up until recently we used the IDLE interface to write and then run Python scripts for ArcGIS. I had PyScripter (PyScripter v2.5.3 32-bit version) installed on my workstation which is a Windows7 64-bit machine. I am running ArcGIS 10.0 SP3 and the Python version is 32-bit; below is the first line when opening the IDLE program that came with the ArcGIS installation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Post installation I noticed several versions of PyScripter IDE to choose from in the Start menu: PyScripter for Python 2.4 thru 3.3, and also one for 'Latest Version'. I assumed that the 2.6 version was the best one to use as from the above message in IDLE, it seems our Python version is 2.6.5. I have noticed that when running Python scripts from inside PyScripter they run much slower (5 times slower) than when running the same program from either a DOS command prompt or the IDLE program. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thought as to why this may be occurring?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 12:47:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60509#M4832</guid>
      <dc:creator>BillBass</dc:creator>
      <dc:date>2013-03-27T12:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Python script running slower in PyScripter than with IDLE</title>
      <link>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60510#M4833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you sure it is actually running slower or just not updating the print outs as fast? I've noticed in pyscripter if you are rapidly sending print statements it starts bogging down the GUI much more than IDLE or command/power shell. It always ran at the same actual times for me though.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 12:51:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60510#M4833</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-03-27T12:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Python script running slower in PyScripter than with IDLE</title>
      <link>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60511#M4834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mostly speculation, but it might be because Pyscripter is running everything through a true debugger. IDLE is not.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 16:08:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60511#M4834</guid>
      <dc:creator>PhilMorefield</dc:creator>
      <dc:date>2013-03-27T16:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Python script running slower in PyScripter than with IDLE</title>
      <link>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60512#M4835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Some additional observations and run times (HH:MM:SS). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I ran the python script in 3 ways:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Using the Windows Command Prompt window. 00:03:43&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. From within PyScripter (no debugging, just a straight run using Run command). 1:21:33&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Using the Windows Command Prompt Window, but I happended to have the python script open in PyScripter at the same time. 1:21:33&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: Scenario 3 was the most interesting as it ran just as slow as scenario 2. The only difference being that the python file was open in PyScripter while trying to run from Windows Command Prompt. But if the python script was open in IDLE or Notepad while attempting to run from the Windows Command Prompt, it ran just as fast as in scenario 1 with in a few seconds.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also noticed under the Run &amp;gt; Python Engine menu, there are 4 options: Internal, Remote, Remote (Tk), and Remote (Wx). By default PyScripter has selected Remote. The following website explained the different options and limitations &lt;/SPAN&gt;&lt;A href="http://code.google.com/p/pyscripter/wiki/RemoteEngines"&gt;http://code.google.com/p/pyscripter/wiki/RemoteEngines&lt;/A&gt;&lt;SPAN&gt;. So I tried changing it to Internal from Remote. But that just made it worse, as the program never seemed to get through the first step and PyScripter went into Not Responding mode as I was forced to exit the application.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 14:22:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60512#M4835</guid>
      <dc:creator>BillBass</dc:creator>
      <dc:date>2013-03-28T14:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Python script running slower in PyScripter than with IDLE</title>
      <link>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60513#M4836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Some additional observations and run times (HH:MM:SS). &lt;BR /&gt;I ran the python script in 3 ways:&lt;BR /&gt;1. Using the Windows Command Prompt window. 00:03:43&lt;BR /&gt;2. From within PyScripter (no debugging, just a straight run using Run command). 1:21:33&lt;BR /&gt;3. Using the Windows Command Prompt Window, but I happended to have the python script open in PyScripter at the same time. 1:21:33&lt;BR /&gt;Note: Scenario 3 was the most interesting as it ran just as slow as scenario 2. The only difference being that the python file was open in PyScripter while trying to run from Windows Command Prompt. But if the python script was open in IDLE or Notepad while attempting to run from the Windows Command Prompt, it ran just as fast as in scenario 1 with in a few seconds.&lt;BR /&gt;&lt;BR /&gt;I also noticed under the Run &amp;gt; Python Engine menu, there are 4 options: Internal, Remote, Remote (Tk), and Remote (Wx). By default PyScripter has selected Remote. The following website explained the different options and limitations &lt;A href="http://code.google.com/p/pyscripter/wiki/RemoteEngines"&gt;http://code.google.com/p/pyscripter/wiki/RemoteEngines&lt;/A&gt;. So I tried changing it to Internal from Remote. But that just made it worse, as the program never seemed to get through the first step and PyScripter went into Not Responding mode as I was forced to exit the application.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Wow, that's an amazing difference. Much to my relief, I'm not seeing the same problem. I have a process I run hundreds of times that takes about 2 minutes and 30 seconds in IDLE and is &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;maybe&lt;/SPAN&gt;&lt;SPAN&gt; just a few seconds slower in Pyscripter (I've always used the Remote engine). I'm not even sure there is a difference, really.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe a reinstall of Pyscripter is in order? Seems like something is definitely off in your case.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2013 13:50:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60513#M4836</guid>
      <dc:creator>PhilMorefield</dc:creator>
      <dc:date>2013-03-29T13:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: Python script running slower in PyScripter than with IDLE</title>
      <link>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60514#M4837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am telling my impression about working with PyScripter running ArcGIS scripts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was programming a large process (took about 5-7 minutes). Everything was OK because the time of execution was more or less the same inside or outside ArcGIS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After running several times the script, I notice that PyScripter had become too slow, even for a simple and easy step. I don't know if something is beeing storing somewhere or whatever, but the thruth is that the script run slower!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I decided to try on another computer, so I prepared PyScripter and execute. The same. At the beginning, the execution time was really fast, but after a few tries, the time of running the script became again too slow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The engine I'm using is "Remote"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Feb 2014 05:40:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60514#M4837</guid>
      <dc:creator>DavidTrillo_Montero</dc:creator>
      <dc:date>2014-02-17T05:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Python script running slower in PyScripter than with IDLE</title>
      <link>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60515#M4838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am telling my impression about working with PyScripter running ArcGIS scripts.&lt;BR /&gt;&lt;BR /&gt;I was programming a large process (took about 5-7 minutes). Everything was OK because the time of execution was more or less the same inside or outside ArcGIS.&lt;BR /&gt;&lt;BR /&gt;After running several times the script, I notice that PyScripter had become too slow, even for a simple and easy step. I don't know if something is beeing storing somewhere or whatever, but the thruth is that the script run slower!&lt;BR /&gt;&lt;BR /&gt;I decided to try on another computer, so I prepared PyScripter and execute. The same. At the beginning, the execution time was really fast, but after a few tries, the time of running the script became again too slow.&lt;BR /&gt;&lt;BR /&gt;Any idea?&lt;BR /&gt;&lt;BR /&gt;The engine I'm using is "Remote"&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;The original post was comparing run time in Pyscripter to run times in IDLE. Have you tried running this script in IDLE to see if the problem persists?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 20:45:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60515#M4838</guid>
      <dc:creator>PhilMorefield</dc:creator>
      <dc:date>2014-02-18T20:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Python script running slower in PyScripter than with IDLE</title>
      <link>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60516#M4839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;After running my script step by step, I got possible solutions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One was that arcpy.Exist() take to much if the path has a lot of files! It's faster to use os.path.exist()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have modified the script in order to avoid a directory increasing and increasing with new files every minute, and takes longer to read with arcpy.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 08:52:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60516#M4839</guid>
      <dc:creator>DavidTrillo_Montero</dc:creator>
      <dc:date>2014-02-19T08:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Python script running slower in PyScripter than with IDLE</title>
      <link>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60517#M4840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;After running my script step by step, I got possible solutions.&lt;BR /&gt;&lt;BR /&gt;One was that arcpy.Exist() take to much if the path has a lot of files! It's faster to use os.path.exist()&lt;BR /&gt;&lt;BR /&gt;I have modified the script in order to avoid a directory increasing and increasing with new files every minute, and takes longer to read with arcpy.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using os.path.exists() will be faster, but you have to be careful. This will only work for features stored in a file system workspace; os.path.exists() cannot pick up geodatabase feature classes.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;gt;&amp;gt;&amp;gt; import arcpy, os
&amp;gt;&amp;gt;&amp;gt; fc = r'\\Arcserver1\gis\RICO\M23106103\ESRI\Themes\Connections\Connections.gdb\Connection_Parcels'
&amp;gt;&amp;gt;&amp;gt; shp = r'\\Arcserver1\gis\RICO\_Basemap\ESRI\Themes\Soils\Rico_Soils.shp'
&amp;gt;&amp;gt;&amp;gt; for feat in [shp, fc]:
 print '{0} Exists according to arcpy: {1}'.format(os.path.basename(feat), arcpy.Exists(feat))
 print '{0} Exists according to os: {1}'.format(os.path.basename(feat), os.path.exists(feat))

 
Rico_Soils.shp Exists according to arcpy: True
Rico_Soils.shp Exists according to os: True
Connection_Parcels Exists according to arcpy: True
Connection_Parcels Exists according to os: False
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:18:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60517#M4840</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-10T22:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Python script running slower in PyScripter than with IDLE</title>
      <link>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60518#M4841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I already know it, but ... &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the tip!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 12:34:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-running-slower-in-pyscripter-than/m-p/60518#M4841</guid>
      <dc:creator>DavidTrillo_Montero</dc:creator>
      <dc:date>2014-02-19T12:34:02Z</dc:date>
    </item>
  </channel>
</rss>

