clearing an interactive python interpreter/shell - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: General (https://python-forum.io/forum-1.html) +--- Forum: News and Discussions (https://python-forum.io/forum-31.html) +--- Thread: clearing an interactive python interpreter/shell (/thread-15693.html) |
clearing an interactive python interpreter/shell - rootVIII - Jan-27-2019 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 RE: clearing an interactive python interpreter/shell - DeaD_EyE - Jan-28-2019 On Linux: CTRL + L
RE: clearing an interactive python interpreter/shell - perfringo - Jan-28-2019 (Jan-28-2019, 04:58 AM)DeaD_EyE Wrote: On Linux: On MacOS CMD + K
RE: clearing an interactive python interpreter/shell - snippsat - Jan-28-2019 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). RE: clearing an interactive python interpreter/shell - rootVIII - Jan-28-2019 I don’t like keyboard shortcuts as much because I have to remove my hands from the qwerty position hahaha |