How to hide the cursor in the REPL

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
kak
Posts: 22
Joined: Fri Oct 05, 2018 11:35 am

How to hide the cursor in the REPL

Post by kak » Fri Feb 08, 2019 12:52 pm

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

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: How to hide the cursor in the REPL

Post by Roberthh » Fri Feb 08, 2019 1:43 pm

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"

Post Reply