Clearing screen in python
Go to solution
Solved by fizzlesticks,
11 minutes ago, Pythons said:sys.stderr.write(char)
sys.stdout.flush()
You're writing to stderr but flushing stdout. stderr should only be used for errors.
Quoteimport os
os.system('cls')
It doesn't work in IDLE, only python.exe
You can't clear the screen in IDLE. You can print a bunch of blank lines but that will look horrible, best option is to fix the other problem and run it outsite of an IDE.

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now