How does nano have a gui interface on ssh

Viewed 241

I would like to write a python app that manages the ssh screen in a fashion similar to the nano editor on a RPI. Accept input and place output data at fixed locations of the ssh window. Does someone know how this is done?

1 Answers

They draw their interface using ANSI sequences. Python has a built in module to this called curses, which is a binding for the ncurses library.

You can check out the documentation and the tutorial.

If you are willing to use libraries, there are higher level ones like urwid.

Related