i have simple python curses code creates subwindow. however, in process of running function window.subwin() fails message: here test case: import curses if __name__ == '__main__': curses.initscr() window = curses.newwin(15, 40, 7, 20) window.box() window.refresh() subwindow = window.subwin(5, 10, 2, 2) subwindow.box() subwindow.refresh() subwindow.getkey() curses.endwin() produces following output: traceback (most recent call last): file "c.py", line 12, in <module> subwindow = window.subwin(5, 10, 2, 2) _curses.error: curses function returned null is there way more descriptive message? the error happens when not possible create sub-window (illegal operation). can happen because asking paint sub-window outside of window. the method subwin receives absolute coordinates (with respect screen, not parent window). fail if subwin coordinates outside of window . reason fail: width or height overfl...
Comments
Post a Comment