Losing curses decorations.

Joe Keen joekeen at gmail.com
Wed Oct 8 09:47:04 EDT 2008


On Oct 8, 1:16 am, Peter Otten <__pete... at web.de> wrote:
> Joe Keen wrote:
> > I'm working on a small curses application that opens an external
> > editor occasionally; in the current case I'm testing its running vi.
> > Once I exit vi and return to the curses application I lose the
> > background color, window frames, and any text I had on the screen
> > before I opened vi.  I can still see the program functioning though as
> > it is still responding to key strokes and still updating small
> > portions of the screen.  I'm obviously doing something wrong but so
> > far I haven't been able to figure out what from the documentation.
>
> > I've boiled the problem I'm seeing down to a relatively small program:
>
> Does redrawing
>
> > def vitest():
> >     os.system('vi /tmp/foo_bar_baz');
>
>       screen.redrawwin()
>       screen.refresh()
>
> >     return 1
>
> help?
>
> Peter

It helps a little bit.  Using that the line I modified with
screen.addstr(1,1,"Got: "+key) now has the proper background color and
the window decorations on the far ends.  Only that line does though.
My understanding is that curses is going to try and redraw as little
as possible.  Is there a function to force a full redraw?  Or is that
redrawwin function supposed to be doing that?



More information about the Python-list mailing list