[Tutor] Why does using "window.addchr()" to place a character at the lower right corner raise an exception?

Alex Kleider akleider at sonic.net
Wed Feb 27 21:09:47 EST 2019


On 2019-02-27 17:48, boB Stepp wrote:
> Under https://docs.python.org/3/library/curses.html#window-objects in
> the curses docs, it states:
> 
> <quote>
> window.addch(ch[, attr])
> window.addch(y, x, ch[, attr])
> [...]
> 
> Note
> 
> Writing outside the window, subwindow, or pad raises a curses.error.
> Attempting to write to the lower right corner of a window, subwindow,
> or pad will cause an exception to be raised after the character is
> printed.

Could it be that as soon as the character is printed the cursor moves to 
the 'next location' which is outside of the 'window, subwindow, or pad' 
and it is this which causes the error to be raised?


More information about the Tutor mailing list