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.
The short answer, no, or at least nothing that won't involve using a COM client to access ArcObjects. If you are up for that, I would start in the Display (ArcObjects .NET 10.6 SDK) and Framework Library Contents (ArcObjects .NET 10.6 SDK) and look at the GPCommandWindow CoClass.
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 (http://sourceforge.net/projects/comtypes/).
I am a VB man and VB has a clear screen for its shell.....
I have not tried but ran across this:
:::: update did not work in the built in Python interpreter in ArcMap. However it did work external python console/ide
Right now I used for the built in Python interpreter:
print "\n" * 80
Solved for a manual clean up... but no code interface
Since it isn't really a full-fledged python IDE.
From within a python ide, like Spyder or Jupyter QtConsole … cls … clears the screen...
You can save the Transcript if you want to move it to Spyder or one of the Jupter interfaces for further work.
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.
The issue is if I write in the python window:
data = 
for row in some_fc:
I now have this in memory,. Clearing the screen is good, but I can still do :
to get back my stuff, so memory is used. How to release this?