Like most Python developers, I typically keep a console window open with the Python interpreter running to test commands, dir() stuff, help() stuff, etc.
Like any console, after a while the visible backlog of past commands and prints gets to be cluttered, and sometimes confusing when re-running the same command several times. I'm wondering if, and how, to clear the Python interpreter console.
I've heard about doing a system call and either calling
As you mentioned, you can do a system call:
>>> import os >>> clear = lambda: os.system('cls') >>> clear()
I am not sure of any other way in Windows.