curses mystical error output

skip at pobox.com skip at pobox.com
Wed May 2 20:39:02 EDT 2007


    >> screen.addstr(row, 39, "|")
    >> 
    >> where row is 3.

    Ian> You might be trying to write to a section that is currently off
    Ian> screen.  Seems to me when I was doing some curses stuff that when I
    Ian> tried to write to one more row than could be fit onto my terminal
    Ian> that error would come up.

    Ian> Try doing the following code and make sure that you can enough
    Ian> space to draw it.

    >>> (height, width) = screen.getmaxyx()

Thanks, I gave that a try.  40 rows and 80 columns.  I should have pointed
out that out before.  I stuck a couple asserts on the row and column
values.  They didn't trip, the "addstr() returned ERR" tripped.

Skip




More information about the Python-list mailing list