Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
clearing an interactive python interpreter/shell
#1
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
Quote
#2
On Linux: CTRL + L
My code examples are always for Python >=3.6.0
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Quote
#3
(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
Quote
#4
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).
Quote
#5
I don’t like keyboard shortcuts as much because I have to remove my hands from the qwerty position hahaha
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Notepad++ with Python interpreter Truman 14 2,321 Feb-27-2019, 11:54 PM
Last Post: Truman
  venv conflict at shell prompt Skaperen 3 167 Feb-21-2019, 02:18 AM
Last Post: Larz60+
  embedding Python script in shell scripts Skaperen 5 1,135 Mar-23-2018, 01:07 AM
Last Post: Skaperen
  Python interactive/live programming framework, is it useful for you? sjdv1982 0 718 Oct-15-2017, 01:55 PM
Last Post: sjdv1982
  seamless: an interactive/live programming framework sjdv1982 0 627 Oct-15-2017, 12:54 PM
Last Post: sjdv1982
  facing problem with running interactive shell using paramiko saswatidas437 1 2,136 Oct-26-2016, 03:38 AM
Last Post: Larz60+
  Windows/Power Shell: Differences from the tutorial... diemildefreude 22 6,339 Oct-10-2016, 03:36 AM
Last Post: diemildefreude

Forum Jump:


Users browsing this thread: 1 Guest(s)