How can Python code clear the Run Window? I am writing in PyCharm.
I tried different options from the internet, but nothing works.
from os import system print ("The console is still full of text.") system ('cls') # leaves trash
If you notice that some symbol is still displayed in the paycharm console – this is the symbol for cleaning the console. Because Paycharm is designed to debug programs, and not to run them, it displays this symbol, and does not clear the console, this can help detect bugs in complex applications. If you save your program and run it with python, the console will really clean up. If you create an .exe file and put it on display for the community, it will also be cleaned for everyone.
So if you need (for specific reasons) to clear the paycharm console, do as advised SKIP – via pyautogui.
Or more simply
print ("\ n" * 99999)
But then be prepared for the fact that many problems will become more difficult to detect.