[Tutor] clearscreen command

dman dsh8290@rit.edu
Sat, 12 Jan 2002 20:39:33 -0500


On Sat, Jan 12, 2002 at 05:00:42PM -0800, Frank Holmes wrote:
| does python have the equivalent of a clearscreen command?

Python doesn't have "screens" so it can't clear them.  Screens are
part of the OS you're using.  If you use the ncurses library you can
clear the screen (Unix and Cygwin only).  If you assume the terminal
has no more than 30 lines
    print "\n"*30
will have the same effect.  Alternatively you can try and figure out
which escape codes various shells/terminals use to clear the screen.  

-D

-- 

Religion that God our Father accepts as pure and faultless is this: to
look after orphans and widows in their distress and to keep oneself from
being polluted by the world.
        James 1:27