[Tutor] newbie programmer
Dirigo
bbbbosox@mtneer.net
Wed Jun 4 14:58:03 2003
Please see comments/questions (enclosed within "***" 's) inserted in
text below.
Thanks in advance.
------------------- Original Message (sort of -------------------
Alan Gauld <alan.gauld@blueyonder.co.uk>
on Wednesday, June 04, 2003 9:52 AM
wrote:
"Anticipating a FAQ before it comes :-)
How to clear the screen?
Several ways:
Either print lots of newlines
print '\n' * 50
*** Worked great within the Python command line window - Win 98SE OS
(yes, Magnus ... I'm trying to get a copy of Win2K and/or XP - I read
your recommendation in earlier message ;>)) ***
OR
use the operating system command:
os.system('CLS) # DOS
*** Tried this within the Python command line window and got error
message which read "NameError: name 'os' is not defined". I tried
both os.system('CLS') and os.system("CLS") and got the same results.
Also, simply tried "CLS" (as one would in a regular MS-DOS prompt
window) and it also was a no-go. Got error message "CLS" not defined.
So ... I guess this begs the question "For this particular command to
work, do the Hammond Win extensions need to be installed?" I still
haven't installed the Win extensions as I'm still working on get a
better grasp on Python. ***
or
os.system('clear') # Unix
Or be very clever and send the appropriate terminal control
codes (ANSI for DOS, VT100 for Xterms on Unix)"