python - 如何使Python的curses覆盖不透明?

标签 python curses

默认情况下,Python Curses 覆盖层是透明的,其中任何非字符空间都会显示下面的窗口。即使添加“”字符,它仍然显示下面的字符。

有没有办法让覆盖层的空格 (' ') 字符隐藏下面的窗口?我将在稍后删除该窗口,并且不想破坏下部窗口上的数据(当空格为非空字符时,该数据可以正常工作)。

最佳答案

事实证明,我正在寻找的行为正是面板的用途。

Panels are windows with the added feature of depth, so they can be >stacked on top of each other, and only the visible portions of each window >will be displayed. Panels can be added, moved up or down in the stack, and >removed.

https://docs.python.org/2/library/curses.panel.html

关于python - 如何使Python的curses覆盖不透明?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29482807/

相关文章:

python - 从 Python 运行 PowerShell 脚本

Python 诅咒 : module function vs instance function

python - (python) 如何在curses中创建静态文本

python - 在 Windows 上安装 curses .whl 包

c - 如何不间断地从键盘连续获取字符?

python - 在转换为不同类型时扩展元组参数

python Pandas 。使用 Series 创建 DataFrame 不会保留 dtype

python - 附加到一个 python 字典键出于某种原因附加到所有

python - 将信息存储到.exe文件中,从python导出

python - 如何正确刷新 curses 窗口?