Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 clearing an interactive python interpreter/shell
I got really sick of always doing this when I want to clear my shell:

from os import system
Or with the subprocess module etc...

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

from clear_screen import 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
My code examples are always for Python >=3.6.0
Almost dead, but too lazy to die:
All humans together. We don't need politicians!
(Jan-28-2019, 04:58 AM)DeaD_EyE Wrote: On Linux: CTRL + L

On MacOS CMD + K
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Life of Brian: Conjugate the verb, "to go" !
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

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Notepad vs anaconda spyder or python shell ShadowAlpha 2 201 Jun-26-2019, 06:31 AM
Last Post: perfringo
  Notepad++ with Python interpreter Truman 14 3,111 Feb-27-2019, 11:54 PM
Last Post: Truman
  venv conflict at shell prompt Skaperen 3 342 Feb-21-2019, 02:18 AM
Last Post: Larz60+
  embedding Python script in shell scripts Skaperen 5 1,656 Mar-23-2018, 01:07 AM
Last Post: Skaperen
  Python interactive/live programming framework, is it useful for you? sjdv1982 0 843 Oct-15-2017, 01:55 PM
Last Post: sjdv1982
  seamless: an interactive/live programming framework sjdv1982 0 753 Oct-15-2017, 12:54 PM
Last Post: sjdv1982
  facing problem with running interactive shell using paramiko saswatidas437 1 2,493 Oct-26-2016, 03:38 AM
Last Post: Larz60+
  Windows/Power Shell: Differences from the tutorial... diemildefreude 22 7,072 Oct-10-2016, 03:36 AM
Last Post: diemildefreude

Forum Jump:

Users browsing this thread: 1 Guest(s)