[issue43432] Add function `clear` to the `os` module

Eryk Sun report at bugs.python.org
Mon Mar 8 08:39:53 EST 2021


Eryk Sun <eryksun at gmail.com> added the comment:

The idea of adding some kind of clear_screen() function in the os or shutil module was discussed extensively on python-ideas a few months ago:

https://mail.python.org/archives/list/python-ideas@python.org/thread/EWQ2BOL3WVZAU2V2MT3HLXN3AEBHANNZ
https://mail.python.org/archives/list/python-ideas@python.org/thread/N2G5MDPST6IMUQCK6LLAUOVIJIOOC2XJ

I would not want to clear the terminal scrollback buffer, in which case the implementation in Windows would need to use the console API and/or VT sequences instead of the CMD shell's CLS command.

----------
nosy: +eryksun

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43432>
_______________________________________


More information about the Python-bugs-list mailing list