goto, cls, wait commands
Pekka Niiranen
pekka.niiranen at wlanmail.com
Thu Feb 10 14:44:27 EST 2005
import os
if os.name == "nt":
os.system("cls") # Works in w2k
else:
os.system("clear") # Works in cygwin's Bash
Ulf Göransson wrote:
> Bruno Desthuilliers wrote:
>
>> Duncan Booth a écrit :
>>
>>> BOOGIEMAN wrote:
>>>
>>>> Secondly, how do I clear screen (cls) from text and other
>>>> content ?
>>>
>>>
>>> That depends on your computer, and how you are running your program.
>>> One way which *might* work is:
>>>
>>> import os
>>> os.system("cls")
>>
>>
>> *might* work... !-)
>> bruno at bibi modulix $ cls
>> -bash: cls: command not found
>>
>> Bad luck ! didn't work !-)
>
>
> Works for me! But then again...
>
> kairos:ug> cat cls
> #! /usr/local/bin/python
> print "\xc",
>
> /ug 8-)
More information about the Python-list
mailing list