curses mystical error output

Ian Clark turbana at gmail.com
Wed May 2 18:56:41 EDT 2007


On 5/2/07, skip at pobox.com <skip at pobox.com> wrote:
> I have a fairly simple curses app which is giving me this error:
>
>     addstr() returned ERR
>
> I'm trapping it and continuing.  I can see that *some* of my addstring calls
> succeed.  This one happens to be
>
>     screen.addstr(row, 39, "|")
>
> where row is 3.

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

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

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

Ian



More information about the Python-list mailing list