clear shell screen

Shawn Minisall trekker182 at comcast.net
Mon Oct 29 16:31:52 EDT 2007


Hmm...it works fine within the command line but then when I import os in 
python and then try os.system("cls"), i get that very fast 
opening/closing window and 0 inside the shell.

Gabriel Genellina wrote:
> En Mon, 29 Oct 2007 00:08:14 -0300, Shawn Minisall  
> <trekker182 at comcast.net> escribi�:
>
>   
>> Does anyone know how to clear the shell screen completely ?  I tried
>> import os and then os.system("clear") was said to have worked in Windows
>> XP, but it's just bringing up another window, then it turns black and
>> then it closes in within about a second moving the prompt at the
>> os.system("clear") line .  I've also tried os.system("cls") with the
>> same results.
>>     
>
> Try running cls from a command prompt. If it works, it should work from  
> inside Python, using os.system("cls")
>
>
>   




More information about the Python-list mailing list