Clearing the screen

Lars lars-www at
Sat Dec 25 00:33:26 CET 2004

Hi Iswor,

If I understand you correctly then your program is writing output to a
console/terminal window and you want to clear that window.
I don't know of any library methods for that, but you might just do:

os.system("cls")      #for windows
os.system("clear")   #for unix
Not the most advanced solution though.
Happy holidays! 

More information about the Python-list mailing list