<?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: Method for clearing Python Window in ArcMap programmatically in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314266#M24429</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The short answer, no, or at least nothing that won't involve using a COM client to access ArcObjects.&amp;nbsp; If you are up for that, I would start in the&amp;nbsp;&lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#8d81aed9-9643-4e22-930c-3cadcb816891.htm"&gt;Display (ArcObjects .NET 10.6 SDK)&lt;/A&gt; and &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#Framework_library.htm"&gt;Framework Library Contents (ArcObjects .NET 10.6 SDK)&lt;/A&gt; and look at the GPCommandWindow CoClass. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Oct 2018 14:42:10 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2018-10-19T14:42:10Z</dc:date>
    <item>
      <title>Method for clearing Python Window in ArcMap programmatically</title>
      <link>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314264#M24427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way of clearing (flushing) the Python Window in ArcMap from Python (that works in 10.2.1)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2018 13:26:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314264#M24427</guid>
      <dc:creator>DarrenSmith</dc:creator>
      <dc:date>2018-10-19T13:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Method for clearing Python Window in ArcMap programmatically</title>
      <link>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314265#M24428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;like printing a bunch of blank lines? which just pushes what you see up off screen. otherwise no, that is an IDE thing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2018 14:37:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314265#M24428</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-10-19T14:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Method for clearing Python Window in ArcMap programmatically</title>
      <link>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314266#M24429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The short answer, no, or at least nothing that won't involve using a COM client to access ArcObjects.&amp;nbsp; If you are up for that, I would start in the&amp;nbsp;&lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#8d81aed9-9643-4e22-930c-3cadcb816891.htm"&gt;Display (ArcObjects .NET 10.6 SDK)&lt;/A&gt; and &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#Framework_library.htm"&gt;Framework Library Contents (ArcObjects .NET 10.6 SDK)&lt;/A&gt; and look at the GPCommandWindow CoClass. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2018 14:42:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314266#M24429</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-10-19T14:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Method for clearing Python Window in ArcMap programmatically</title>
      <link>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314267#M24430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan, no it was aimed at getting back the memory it consumes, since it seems like it never gets truncated. I output messages to the Python Window for a couple of python addin tools (that are used a lot). The best solution is to stop doing that of course, but just wondered if there's an easy way to clear it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2018 14:46:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314267#M24430</guid>
      <dc:creator>DarrenSmith</dc:creator>
      <dc:date>2018-10-19T14:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: Method for clearing Python Window in ArcMap programmatically</title>
      <link>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314268#M24431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Joshua, it sounds like it'd be easier to stop abusing the use of the Python Window. I guess that I could probably get at the GPCommandWindow from Python via the comtypes library (&lt;A href="http://sourceforge.net/projects/comtypes/"&gt;http://sourceforge.net/projects/comtypes/&lt;/A&gt;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2018 14:53:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314268#M24431</guid>
      <dc:creator>DarrenSmith</dc:creator>
      <dc:date>2018-10-19T14:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Method for clearing Python Window in ArcMap programmatically</title>
      <link>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314269#M24432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;del &amp;nbsp; but garbage collection (gc module) is worth a look.&amp;nbsp; When the tool is completed and closed it should free up stuff, at least on the python side&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2018 15:11:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314269#M24432</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-10-19T15:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: Method for clearing Python Window in ArcMap programmatically</title>
      <link>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314270#M24433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am a VB man and VB has a clear screen for its shell.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not tried but ran across this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.geeksforgeeks.org/clear-screen-python/" title="https://www.geeksforgeeks.org/clear-screen-python/"&gt;https://www.geeksforgeeks.org/clear-screen-python/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;:::: update did not work in the built in Python interpreter in ArcMap. However it did work external python console/ide&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now I used for the built in Python interpreter:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print "\n" * 80&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2018 16:32:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314270#M24433</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2018-10-19T16:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Method for clearing Python Window in ArcMap programmatically</title>
      <link>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314271#M24434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved for a manual clean up... but no code interface&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="424940" alt="" class="image-1 jive-image" height="368" src="https://community.esri.com/legacyfs/online/424940_clear_python_window_pro.png" width="766" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since it isn't really a full-fledged python IDE.&lt;/P&gt;&lt;P&gt;From within a python ide, like Spyder or Jupyter QtConsole &amp;nbsp; … &lt;STRONG&gt;cls …&lt;/STRONG&gt;&amp;nbsp; clears the screen...&lt;/P&gt;&lt;P&gt;You can save the Transcript if you want to move it to Spyder or one of the Jupter interfaces for further work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2018 01:29:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314271#M24434</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-10-21T01:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Method for clearing Python Window in ArcMap programmatically</title>
      <link>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314272#M24435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for taking the time to answer Ted and Dan. I'm really specifically after a way to clear(/reinitialize) the Python Window built-in to ArcMap via Python. It seems like the only way to achieve what I'm after (so far) is via ArcObjects.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2018 08:00:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314272#M24435</guid>
      <dc:creator>DarrenSmith</dc:creator>
      <dc:date>2018-10-22T08:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Method for clearing Python Window in ArcMap programmatically</title>
      <link>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314273#M24436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue is if I write in the python window:&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data = []&lt;/P&gt;&lt;P&gt;for row in some_fc:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;data.append(row stuff)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I now have this in memory,. Clearing the screen is good, but I can still do :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;print data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;to get back my stuff, so memory is used. How to release this?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2018 17:02:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314273#M24436</guid>
      <dc:creator>LukeWebb</dc:creator>
      <dc:date>2018-10-22T17:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Method for clearing Python Window in ArcMap programmatically</title>
      <link>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314274#M24437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;del data&lt;/SPAN&gt;, garbage collection will shortly reclaim the memory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2018 17:22:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314274#M24437</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-10-22T17:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Method for clearing Python Window in ArcMap programmatically</title>
      <link>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314275#M24438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you seem to have missed &lt;STRONG&gt;del&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/thread/223095-method-for-clearing-python-window-in-arcmap-programmatically?commentID=807449#comment" title="https://community.esri.com/message/807449-re-method-for-clearing-python-window-in-arcmap-programmatically?commentID=807449#comment-807449" target="_blank"&gt;https://community.esri.com/message/807449-re-method-for-clearing-python-window-in-arcmap-programmatically?commentID=8074…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and if you want to track and otherwise play with the garbage, look at the gc module&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; gc
dir&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'DEBUG_COLLECTABLE'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'DEBUG_LEAK'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'DEBUG_SAVEALL'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'DEBUG_STATS'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;'DEBUG_UNCOLLECTABLE'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'__doc__'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'__loader__'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'__name__'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'__package__'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'__spec__'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
&lt;SPAN class="string token"&gt;'callbacks'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'collect'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'disable'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'enable'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'garbage'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'get_count'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'get_debug'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
&lt;SPAN class="string token"&gt;'get_objects'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'get_referents'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'get_referrers'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'get_stats'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'get_threshold'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 &lt;SPAN class="string token"&gt;'is_tracked'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'isenabled'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'set_debug'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'set_threshold'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:58:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/314275#M24438</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T14:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Method for clearing Python Window in ArcMap programmatically</title>
      <link>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/1547669#M73010</link>
      <description>&lt;P&gt;Perfect, didn't realize this option was available. Thank you!!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 17:30:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/method-for-clearing-python-window-in-arcmap/m-p/1547669#M73010</guid>
      <dc:creator>MichealKinney</dc:creator>
      <dc:date>2024-10-10T17:30:09Z</dc:date>
    </item>
  </channel>
</rss>

