About 50,400 results
Open links in new tab
  1. Clear the terminal in Python - Stack Overflow

    If so, then put the above function into a file named clear.py. In the terminal, start the Python interpreter, with 'python3'. Enter: >>> import sys >>> sys.path ['', '/usr/lib/python3.3', ... Now …

  2. python - How can I clear the interpreter console? - Stack Overflow

    If x is 2, it will clear entire screen and move cursor to upper left. If x is 3, it will clear entire screen and delete all lines saved in the scrollback buffer. So, this command will clear everything, …

  3. Completely clearing the terminal window using Python

    Jun 10, 2020 · How can I in Python (v 2.7.2) completely clear the terminal window? This doesn't work since it just adds a bunch of new lines and the user can still scroll up and see earlier …

  4. Python - Clearing the terminal screen more elegantly

    Dec 21, 2015 · To use the same source on both Python 2 and 3, you could use os.write() function: import os os.write(sys.stdout.fileno(), clear_screen_seq) clear command on my system also …

  5. Is there a python 3 command to clear the output console?

    Dec 27, 2019 · For window system, cls clear the console. For the Linux system, clear command works. It requires the OS library to be imported. import os clear = lambda: os.system('cls') #on …

  6. How to clear the screen in Python - Stack Overflow

    Jan 27, 2011 · There is now a simple class: pip3 install clear-screen and then to use it: from clear-screen import clear and then the method clear() will clear your shell – user10364045 …

  7. clear terminal (and history!) in Python - Stack Overflow

    Nov 13, 2016 · You could use subprocess.call() from the standard library subprocess module to send the reset command to the terminal which will reinitialize the terminal and in effect do …

  8. How can I clear the terminal in Visual Studio Code?

    Type in the Search Bar on top: Terminal: Clear. An entry with Command: Terminal:Clear will show up with the following VSCode command workbench.action.terminal.clear. Right Click on it and …

  9. Is there a way to clear Python's IDLE window? - Stack Overflow

    Sep 16, 2009 · The "cls" and "clear" are commands which will clear a terminal (ie a DOS prompt, or terminal window). From your screenshot, you are using the shell within IDLE, which won't …

  10. How to clear cmd/terminal while running a python script

    Mar 1, 2014 · I keep seeing ways to clear the shell while running a script, however is there a way to clear the screen while running a script in the CMD? My current method works like this: …

Refresh