[Tutor] newbie programmer

Alan Gauld alan.gauld@blueyonder.co.uk
Wed Jun 4 09:53:01 2003


Anticipating a FAQ before it comes :-)

How to clear the screen?

Several ways:

Either print lots of newlines

print '\n' * 50

OR

use the operating system command:

os.system('CLS)  # DOS or
os.system('clear')  # Unix

Or be very clever and send the appropriate terminal control
codes (ANSI for DOS, VT100 for Xterms on Unix)


Alan G.

----- Original Message -----
From: "Mike Wagman" <mwagman@charter.net>
To: <tutor@python.org>
Sent: Wednesday, June 04, 2003 1:22 PM
Subject: Re: [Tutor] newbie programmer


> Off the top of my head as one relative newbie to another I would
reprint
> the entire menu everytime an option was chosen, and see if there
were a
> way to clear the screen. Don't know if it will work - do know
> interactive python is a great way to "play with code"
>