How to draw the cursor as a vertical bar with python curses library?
Asked
Active
Viewed 261 times
1 Answers
1
You need to do this:
https://stackoverflow.com/a/17100535/9590859
There's no API in curses library for raw control sequences, just run:
def run_control_sequence(sequence):
os.write(sys.stdout.fileno(), bytes(sequence, 'utf-8'))
run_control_sequence('\x1b[\x36 q')
This solution is terminal dependent. The above control sequence is for xterm.

Rui Liu
- 156
- 1
- 6
-
by running this function with given preferences for cursor it will update the cursor in the curses screen? – alexzander Sep 04 '21 at 09:19