Curses is a basic terminal ( or character display ) handling module from Python. This can be used to create Terminal based User interfaces or TUIs.
This is a python port of a more popular C library 'ncurses'
Basic Invocation Example
The wrapper() helper function.
While the basic invocation above is easy enough, the curses package provides the wrapper(func, ...) helper function. The example below contains the equivalent of above:
Here, wrapper will initialize curses, create stdscr, a WindowObject and pass both stdscr, and any further arguments to func. When func returns, wrapper will restore the terminal before the program exits.
This modified text is an extract of the original Stack Overflow Documentation created by following contributors and released under CC BY-SA 3.0