> I tried os.system('cls')...the screen seemed to hang.
Did you try hitting Enter after it?
cls will just clear the screeen...
Alan G.
-----Original Message-----
From: Alan Gauld [mailto:[EMAIL PROTECTED]
Sent: Monday, January 23, 2006 3:37 PM
To: Suri Chitti; [email protected]
Subject: Re: [Tutor] How can I clean the screen
> If I am executing a python prog from the command line and
> need to clear the screen (like using the cls command at the windows
cmd
Thus should be a FAQ somewhere...
Clearing the screen is terminal specific so Python doesn't have a single
way
to do it.
Since you mention Windows I'll assume thats what you are using and
suggest
you
simply use the CLS command via an os.system() call:
import os
os.system('CLS')
If you have Linux substitute 'clear' for CLS
Or as a last resort write your own:
def cls(rows=100):
for row in rows: print
If you use curses it has a couple of functions for clearing a window.
HTH,
Alan G.
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor