[Tutor] Clear Screen

fleet@teachout.org fleet@teachout.org
Thu, 26 Jul 2001 12:30:13 -0400 (EDT)


NO! WAIT!  I know how to do it!

I've written a function clear() as follows:

def clear():
    import os
    cls=os.popen("clear").read()
    eval(cls)

It works fine except it leaves two lines at the top of the screen (a minor
irritant - they usually display "SyntaxError" :) ).

I would dearly love to assign this function to "cls" but
(apparently due to the "eval") I've had no luck.  Any hints - or am I
stuck with "clear()" or (changing things around in the function) "cls()?"

					- fleet -