symbolic links, aliases, cls clear

Keith Thompson kst-u at mib.org
Wed Apr 12 13:36:56 EDT 2006


floyd at apaflo.com (Floyd L. Davidson) writes:
> af.dingo at gmail.com wrote:
>>If I may recommend an alternative,
>>
>>print "\033[H\033[J"
>>
>>the ansi sequence to clear the screen.
>
> Or so you would hope (however, that is *not* what you have listed!).
>
> Unfortunately, it is poor practice to hard code such sequences.
> Instead the proper sequence should be obtained from the
> appropriate database (TERMINFO or TERMCAP), and the easy way to
> do that is,
>
>    tput clear

(Or "clear".)

On the other hand, I think it's been at least a decade since I've used
a terminal or emulator that's not VT100-compatible (i.e., accepts ANSI
control sequences).

Of course, I'll run into one the day after I start writing code that
depends on that assumption.

-- 
Keith Thompson (The_Other_Keith) kst-u at mib.org  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center             <*>  <http://users.sdsc.edu/~kst>
We must do something.  This is something.  Therefore, we must do this.



More information about the Python-list mailing list