import curses # curses: writing to window's bottom right position raises: `_curses.error: # addstr() returned ERR' # initiate ncurses stdscr = curses.initscr() # turn off automatic echoing of keys to the screen curses.noecho() try: # writing to window's last col where the row isn't the last stdscr.subwin(2, stdscr.getmaxyx()[1], 0, 0).addstr(0, stdscr.getmaxyx()[1] - 1, 'x') stdscr.refresh() # writing to the screen window's last row where the col isn't last stdscr.addstr(stdscr.getmaxyx()[0] - 1, stdscr.getmaxyx()[1] - 2, 'x') stdscr.refresh() ## Following fails: ## writing to window's bottom right positions #stdscr.subwin(1, stdscr.getmaxyx()[1], 0, 0).addstr(0, stdscr.getmaxyx()[1] - 1, 'x') #stdscr.refresh() ## writing to the screen window's bottom right positions #stdscr.addstr(stdscr.getmaxyx()[0] - 1, stdscr.getmaxyx()[1] - 1, 'x') #stdscr.refresh() finally: curses.endwin() while 1: pass