On 2006-04-12, Floyd L. Davidson wrote: > [EMAIL PROTECTED] 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.
I was bitten by that shortly after I started shell scripting. However, since all such code was isolated in functions, converting to a new terminal type was simple -- and quick. These days, the ISO-6429 standard (almost the same as the older ANSI x3.64) is so close to universal that I don't bother writing for anything else any more. If the need arises, I'll do it, but it will be simple to do, and much faster (both in coding and script execution) than trying to accommodate all terminals from the start. > Instead the proper sequence should be obtained from the > appropriate database (TERMINFO or TERMCAP), and the easy way to > do that is, > > tput clear I still have a system which does not have tput. -- Chris F.A. Johnson, author | <http://cfaj.freeshell.org> Shell Scripting Recipes: | My code in this post, if any, A Problem-Solution Approach | is released under the 2005, Apress | GNU General Public Licence -- http://mail.python.org/mailman/listinfo/python-list