
On 2020-12-22 14:01, Steven D'Aprano wrote:
It seems to me that the primary use for this will be in the interactive interpreter. People are used to something like "cls" or "clear" from various shells. Using it in scripting is, I think, a secondary use-case.
Given that, I think that like other conveniences for interactive use like `help`, it should be available without an import.
Agreed in general, however Ctrl+L is mostly available for this purpose. There are two major exceptions unfortunately.
One is when using cmd.exe. However, every other combination of shell and console/terminal on Windows does support it. Not to mention everywhere Unix has an influence.
Second is the Python REPL console on Windows. I'm guessing it wouldn't be too hard to add Ctrl+L handling to it. Would be useful I think, regardless of some of the other decisions that need to be made.
-Mike