'Shutdown the curses window.'

def end(self):

    if hasattr(curses, 'echo'):
        curses.echo()
    if hasattr(curses, 'nocbreak'):
        curses.nocbreak()
    if hasattr(curses, 'curs_set'):
        try:
            curses.curs_set(1)
        except Exception:
            pass
    curses.endwin()
