[Tutor] How to clear the screen

Alan Gauld alan.gauld at btinternet.com
Mon Oct 20 18:45:01 CEST 2008


"W W" <srilyk at gmail.com> wrote 

> if os.system('cls') == 0:
>    pass
> elif os.system('clear') == 0:
>    pass
> else:
      print '\n' * 80

> That should take care of most of your OS' out there...

Why raise an error when you can just clear it by brute force?

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld



More information about the Tutor mailing list