I'm looking for a command to clear the screen in python, with so far no luck. I'm want to make a python drawing program, and I am updating the "canvas" (A series of spaces and pound signs stored in lists) every time a change is made. I have tried both os.system('clear')
and call('clear')
, but I've found that instead of clearing the screen, they both just add newlines until all the characters from before the command are not visible. This is unwanted because otherwise the user can just scroll up and look at the previous formats of the "canvas". So, is there a python command that legitimately clears the screen?
This is not a duplicate question. I have looked at the question that someone posted, and all answers still turned up the same: newline characters, but no "real" screen clearing.