On 2020-10-17 17:21, Eryk Sun wrote:
On 10/16/20, Rob Cliffe via Python-ideas <python-ideas@python.org> wrote:

May I suggest it be called os.clearscreen()?

I'd prefer shutil.clear_screen(). There's already
shutil.get_terminal_size(). I know there's also
os.get_terminal_size(), but its use isn't encouraged.


Clear is fine, it's been a Unix command for decades, while DOS "cls" is too terse. No need to be overly wordy however. Clear takes a few parameters as well, for scrollback etc on a recent Linux.

Also, a shell is not a terminal, so terminal routines don't feel right in shutil. Putting get_terminal_size() there was a mistake imho.

-Mike
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/PLMMF6YC6IFUCRFAJLQXS7CUFF7TP2JH/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to