os.system('cls')

D'Arcy J.M. Cain darcy at druid.net
Thu Dec 25 08:51:43 EST 2008


On Thu, 25 Dec 2008 13:11:09 +0100
"Dennis van Oosterhout" <de.slotenzwemmer at gmail.com> wrote:
> Btw...does that mean that system('cls') only works on Windows...or to
> say it otherwise: the program isn't platform independant?

Exactly - sort of.  Unless, of course, you have a program called "cls"
installed on other platforms.  The "system" method is platform
independent in that it runs system commands on all platforms but it has
no control over what system commands happen to exist on your system.
Depending on the command you run it may not even be portable to another
Windows system of exactly the same version.

BTW, "os.system('clear') will clear the screen on many Unix systems.

-- 
D'Arcy J.M. Cain <darcy at druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



More information about the Python-list mailing list