[EMAIL PROTECTED] wrote:
>it would be nice if python provided a termcap or terminfo library,
>wouldn't it?
Try "import curses".
--
Floyd L. Davidson<http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) [EMAIL PROTECTED]
"Chris F.A. Johnson" <[EMAIL PROTECTED]> wrote:
>On 2006-04-12, Floyd L. Davidson wrote:
>> Keith Thompson <[EMAIL PROTECTED]> wrote:
>>>>tput clear
>>>
>>>(Or "clear".)
>>
>> But /clear/ merely uses "tpu
Keith Thompson <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] (Floyd L. Davidson) writes:
>> [EMAIL PROTECTED] wrote:
>>>If I may recommend an alternative,
>>>
>>>print "\033[H\033[J"
>>>
>>>the ansi sequence to clear the sc
for your Python
program.
Note that if /clear/ does work, but you want this script to use
/cls/ so that it is portable to some silly OS where a /cls/
exists... You can define a shell function (which will be
inherited by sub-shells) to look like this,
function cls () {
clear;
}
And p
he proper sequence should be obtained from the
appropriate database (TERMINFO or TERMCAP), and the easy way to
do that is,
tput clear
--
Floyd L. Davidson<http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) [EMAIL PROTECTED]
--
http://m