[issue984870] curses: getmaxyx() breaks when the window shrinks
A.M. Kuchling added the comment: I agree with Chris's logic; the incorrect size seems to be a curses/ncurses bug that has gotten fixed somewhere along the line. You also aren't able to shrink the terminal to be smaller than the size of a derived window created with derwin(), but you seem to get an exception when you try rather than a crash. This seems reasonable to me. I don't think we need to document this behaviour, because that edge case would really belong in the ncurses documentation (and they might change it from version to version). -- resolution: - invalid stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue984870 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue984870] curses: getmaxyx() breaks when the window shrinks
Christian Hudon added the comment: I get the same traceback. The traceback happens only when the window is shrunk below the size specified in derwin(). It's easy to see this by changing the first and second arguments to the derwin call to something like 2, 2, and then you can resize the window to a much smaller size without getting this exception. (My curses.version is 2.2 also. Running on OSX Mavericks.) The getmaxyx() function reports the correct size when the window is shrunk. Also note that the upstream bug has been closed, with the comment Not seen in python 2.7. So I think we can close this. Maybe we want to document the behavior of derwin() and related functions of raising _curses.error when the dimensions of the terminal are smaller than that of the window, though? (Or maybe raise a better exception?) That should probably be another bug report, though. -- nosy: +chrish42 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue984870 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue984870] curses: getmaxyx() breaks when the window shrinks
akira 4kir4...@gmail.com added the comment: The test produces a traceback while shrinking a window (increasing the window size works ok): Traceback (most recent call last): File screen-resize-bug-curses.py, line 22, in module curses.wrapper(main) File /.../python2.7/curses/wrapper.py, line 43, in wrapper return func(stdscr, *args, **kwds) File screen-resize-bug-curses.py, line 17, in main init_display(stdscr) File screen-resize-bug-curses.py, line 9, in init_display rootwin = stdscr.derwin(20, 50, 0, 0) _curses.error: curses function returned NULL Version info: $ python2.7 -c'import curses; print curses.version' 2.2 -- nosy: +akira ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue984870 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue984870] curses: getmaxyx() breaks when the window shrinks
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue984870 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue984870] curses: getmaxyx() breaks when the window shrinks
Daniel Diniz aja...@gmail.com added the comment: I get a different behavior, with shrinking reporting correct sizes, but quiting with a _curses.error: curses function returned NULL, on trunk, KDE 3.5's Konsole._curses.error: curses function returned NULL -- nosy: +ajaksu2 stage: - test needed type: - behavior versions: +Python 2.6 -Python 2.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue984870 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com