You can use the function system() of the os module.
os.system('clear') in Unix or in Windows os.system('clear')-- Edgar A. Rodriguez V.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
g
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
2006/1/23, Suri Chitti <[EMAIL PROTECTED]>:
>
> Dear group,
>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
> prompt) midway into the program, how do I do it?? Any inputs will be
> greatly appreciated.
I tried os.system('cls')...the screen seemed to hang.
-Original Message-
From: Alan Gauld [mailto:[EMAIL PROTECTED]
Sent: Monday, January 23, 2006 3:37 PM
To: Suri Chitti; tutor@python.org
Subject: Re: [Tutor] How can I clean the screen
>If I am executing a pyt
>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
Try :import osos.system('cls')you will able to see the effect when you run in windows console.Cheers,pujoOn 1/23/06, Suri Chitti
<[EMAIL PROTECTED]> wrote:Dear group,
If I am executing a python prog from the command line andneed to clear the screen (like using the cls command at the win
Dear group,
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
prompt) midway into the program, how do I do it?? Any inputs will be
greatly appreciated.
Thanks.
_