[Tutor] re clear screen

lumbricus@gmx.net lumbricus@gmx.net
Sun Nov 10 10:27:01 2002


> Good morning.

Dito!
 
> I am running Python in command line interface mode on Windows 2000. Is a
> clear screen command available?

import os
os.system("cls")

UNIX:
os.system("clear")

So for portability:
if os.platform == some_platform:
	etc...
else: print '\n'*24

or use curses (Don't know whether this is available on W*doze)
Perhaps there are some ansi codes (load ANSI.SYS) for
clearing the screen, too.

HTH, J"o!

> thanks very much,
> 
> Geoff Lloyd
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
> 

-- 
Wir beschliessen etwas, stellen das dann in
den Raum und warten dann einige Zeit ab, was
passiert. Wenn es dann kein grosses Geschrei
gibt und keine Aufstaende, weil die meisten
gar nicht begreifen, was da beschlossen
wurde, dann machen wir weiter - Schritt fuer
Schritt, bis es kein Zurueck mehr gibt. 
   -- J-C Juncker

+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!