How do I delete a curse window in python and restore background window?
Posted
by Zloy Smiertniy
on Stack Overflow
See other posts from Stack Overflow
or by Zloy Smiertniy
Published on 2010-04-04T18:15:13Z
Indexed on
2010/04/04
22:23 UTC
Read the original article
Hit count: 181
Hell-o guys, I'm working on python curses and I have my initial window with initscr() and I create several new windows to overlap it, I want to know if I can delete these windows and restore the standard screen without having to refill it. Is there a way? I can also ask if someone can tell me the difference between a window, subwindow, pad and sub pad.
I have this code:
stdscr = curses.initscr()
Then I fill it with random lettersstdscr.refresh() newwin=curses.newwin(10,20,5,5) newwin.touchwin() newwin.refresh()
I want to delete newwin here so that if I write stdscr.refresh() newwin won't appearstdscr.touchwin() stdscr.refresh()
And here it should appear as if no window was created.© Stack Overflow or respective owner