saving curses screen state (putwin() and getwin() again)
Douglas Soares de Andrade
dsa at unilestemg.br
Wed Nov 10 16:20:49 EST 2004
Can you release a source code for this program ? Im wanting to use curses and
python, but havent found any doc.
Thanks !
Em Qua 10 Nov 2004 04:48, Matt Garman escreveu:
> I'm working on a curses-based application in Python. I've
> implemented what I call a "Chooser" (a fancy name for a menu):
>
> ---> 1. Choice 1 <---
> 2. Choice 2
> 3. Choice 3
>
> So the user can use the arrow keys to change choices. When he hits
> enter, the screen is re-drawn with a new interface. When that
> interface is quit, the screen should return to the Chooser, exactly
> as it was left.
>
> So my strategy is to call putwin() before going to the new
> interface, and call getwin() after returning from the previous
> interface.
>
> This works as described the *first* time, but subsequent calls to
> getwin() return the window that was saved with the first call to
> putwin(). I.e., it's as though only the first call to putwin() has
> any effect.
>
> Any thoughts?
>
> Thanks!
> Matt
>
> --
> Matt Garman
> email at: http://raw-sewage.net/index.php?file=email
More information about the Python-list
mailing list