0

How to draw the cursor as a vertical bar with python curses library?

Rui Liu
  • 156
  • 1
  • 6

1 Answers1

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