Page 1 of 1

How to hide the cursor in the REPL

Posted: Fri Feb 08, 2019 12:52 pm
by kak
Is there a way to hide the cursor in the REPL?

Background is, I want to show some live bargraphs from ADC readings, consisting of ASCII characters.
It works well, but there are always flickering remains of the cursor all over the screen.
Can I disable it somehow?

Thanks

Re: How to hide the cursor in the REPL

Posted: Fri Feb 08, 2019 1:43 pm
by Roberthh
That depends on the terminal emulator you use. If it is vt100 compatible, you can try the respectove escap sequence:
ESC [ ? 25 l, as string: "\x1b[?25l"
to switch it on use
ESC [ ? 25 h, as string: "\x1b[?25h"