在声明一个 10 x 10 pad 后,我显然无法无误地写入右下角 9、9 。这里发生了什么?
import curses
def start(stdscr):
curses.curs_set(0)
movement = curses.newpad(10, 10)
movement.addstr(8, 9, '+')
movement.addstr(9, 8, '+')
movement.addstr(9, 9, '+') #This line causes an error
if __name__ == '__main__':
curses.wrapper(start)
原因:
File "curses_movement_testing.py", line 35, in <module>
curses.wrapper(start)
File "/usr/lib64/python2.6/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "curses_movement_testing.py", line 10, in start
movement.addstr(9, 9, '+')
_curses.error: addstr() returned ERR
为什么我不能写到右下角的单元格?