[Python-ideas] Suggestion: Clear screen command for the REPL

Terry Reedy tjreedy at udel.edu
Mon Sep 19 06:18:38 EDT 2016


On 9/19/2016 4:31 AM, Paul Moore wrote:

> shutil.get_terminal_size() is available on all platforms.

On windows, it works with Command Prompt and PowerShell but fails in 
IDLE, as it must.  In the absence of knowledge, it guesses the default 
of 80 x 24 (as documented).  AFAIK, there is no way whether an answer of 
80 x 24 is correct or arbitrary nonsense.  Returning 0 x 0 instead would 
be more informative.



Terry Jan Reedy



More information about the Python-ideas mailing list