Python Forum

Full Version: clearing an interactive python interpreter/shell
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I got really sick of always doing this when I want to clear my shell:

from os import system
system('clear')
Or with the subprocess module etc...

So I made the simplest module ever on Pypi: pip3 install clear-screen

from clear_screen import clear
clear()
The import statement isn't much better than the os module import... but I like being able to quickly type clear() when I want to. Maybe there is already a module to do this? If not then there is now! clear-screen
On Linux: CTRL + L
(Jan-28-2019, 04:58 AM)DeaD_EyE Wrote: [ -> ]On Linux: CTRL + L

On MacOS CMD + K
In cmder with interactive shell ptpython(my favorite) or IPython.
Then do CTRL + L work.

IDLE and cmd is just bad compare to what i posted over in Windows.
I use command line a lot,so using cmd/powershell is just terrible compared to cmder(16k stars on GitHub).
cmder is as good as any Terminal/shell that i use on Linux(i like to use fish shell on Linux).
I don’t like keyboard shortcuts as much because I have to remove my hands from the qwerty position hahaha