Question: copy/deepcopy with the curses module?
dwalker at iximd.com
Mon Aug 16 09:19:29 EDT 1999
A.M. Kuchling wrote in message ...
>Here's a suggestion (that I haven't tried): create a new window the
>size of the entire screen and render the SIO instance into it; this
>should overwrite all the other information on the screen. Then
>restore the old display by deleting the new window and refreshing the
>screen. Something like 'win = stdscr.newwin(0,0) ; ... do stuff with
>win ; del win ; stdscr.refresh()'...
Since I posted the original message I found inch(). I was thinking
about saving the text that is about to be overwritten, and when I'm done
with the current object, just repaint from this buffer. Throw this code
into my class Dialog (which is nothing more than a screen region if you look
at it from a certain standpoint) and it becomes automagic.
Unless, of course, the window will take care of all that for me. I'll
hack it out later tonight. The buffer method would probably be quite slow.
There is nothing stopping me from manhandling the SIO instance for while
there are many objects using it, only one uses it at a time. So it becomes
a matter of cleaning up after myself.
More information about the Python-list