[Tutor] Clearing the screen?
James Lockley
jpl@global.co.za
Tue, 6 Feb 2001 21:09:19 +0200
you can also backspace what ever you had written to screen previously
import time
for x in range(10):
print x,3*'\b',
time.sleep(0.5) # just lets it happen at more vsible speed
there is also another backslashed command for clearing the line but am
afraid it has slipped my mind
cheers
james
----- Original Message -----
From: "Glen Wheeler" <wheelege@tsn.cc>
To: <tutor@python.org>
Sent: Tuesday, February 06, 2001 2:17 PM
Subject: Re: [Tutor] Clearing the screen?
> Don't know if this is the answer your looking for - but you could say
> print a whole bunch of empty line...like say
>
> pirnt "\n" * 50
>
> It sorta clears the screen :)
>
>
> ----- Original Message -----
> From: John Precedo <johnp@reportlab.com>
> To: python-tutor mailing list <tutor@python.org>
> Sent: Tuesday, February 06, 2001 10:42 PM
> Subject: [Tutor] Clearing the screen?
>
>
> > Hi everyone!
> >
> > I've been working with Python for a few months now, and I'm
> > beginning to get quite good at it. Well, one of my friends
> > has asked me a question, and it's bugging the hell out of me
> > that I can't answer it! Maybe one of you kind folks could
> > help?
> >
> > Right, say you have a program that does nothing fancy, just
> > prints output to STDIO. The output is nothing fancy
> > either -just text. But, you want to make each run distinct -
> > you don't want junk from one run cluttering up the screen on
> > the next run and confusing you.
> >
> > Is there any simple way of clearing the screen? Something
> > like the old Basic CLS command?
> >
> > (And yes, I know you could probably do it using Tkinter -
> > but I'm not going there for something so simple!)
> >
> > Anyway, thanks in advance for any help.
> >
> >
> >
> > _______________________________________________
> > Tutor maillist - Tutor@python.org
> > http://mail.python.org/mailman/listinfo/tutor
>
>
>