I am using the python curses library. I am trying to make an asterisk blink using this code win.addstr(6, 4, "*", curses.A_BLINK)
However it does not work on gnome terminal. I tried using it on xterm and it works. It also does not work on the recovery shell. How can I make text blink using the curses library or some other method?
You could make a program (whether with curses or even hardcoded) that draws text on the screen and overwrites it with blanks, with a suitable time delay (if it's too short, it annoys people — see PuTTY for an example of that).
The drawback is that it would "blink" only as long as the program runs, and of course it's a little complicated.
As a shell script, you could do this:
stty
settings,stty
settings to prevent output of carriage return (\r
) from being converted to \r\n
\r
sleep 1
stty
settings.For a curses application - you could make it "blink" by replacing the text, in a similar way. For what it's worth, the xmas example in ncurses-examples uses a combination of window copying and terminal blinking for its animation effects (see C blinkit function and Python translation).