嘿,伙计们,我正在研究 python curses,我的初始窗口带有 initscr(),我创建了几个新窗口来重叠它,我想知道我是否可以删除这些窗口并恢复标准屏幕而不必重新填充它。有办法吗?我还可以问是否有人可以告诉我窗口、子窗口、垫和子垫之间的区别。
我有这个代码:
stdscr = curses.initscr()
####Then I fill it with random letters
stdscr.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 appear
stdscr.touchwin()
stdscr.refresh()
####And here it should appear as if no window was created.