I don't think there's a Python command to do this.

You can always print enough newlines to clear your view of the window:

print "\n" * 80

or use os.system to issue a command the shell/terminal/cmd will understand

import os
os.system("cls")

or

import os
os.system("clear")


I resently made a 'game of life' clone and used the first method to clear the screen. It's good enough for many things!

Nick


Monte Milanuk wrote:
Okay, simple question: is there anything similar to to 'clear' or 'cls' to clean up a console window full of commands in the python shell? Short of exiting and restarting the interpreter I'm not having a lot of luck here.

Thanks,

Monte
------------------------------------------------------------------------

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to