python - 使用 (n)curses 打印到终端的右侧或底部

标签 python c ncurses curses

使用 n/curses 打印到终端窗口右侧和/或底部的标准方法是什么?

这是一个小草图:

Terminal window:
================================================================================
                                                                         [ MSG ]













message number 2                                                   here is more
================================================================================

C 或 Python 中的解决方案很好。

谢谢!

最佳答案

我会选择:

mvprintw(COLS-length("msg"),1,"msg");
mvprintw(0,LINES-1,"message number 2");
mvprintw(COLS-length("here is more"),LINES-1,"here is more");

这有点即兴,这就是我进行大部分 curses 编程的方式。

关于python - 使用 (n)curses 打印到终端的右侧或底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6574836/

相关文章:

c - 了解 Aleph One 的第一个缓冲区溢出漏洞

c - (C 语言) 如何在使用 getchar() 时使用退格键;在这个功能?

c - 在 Ubuntu 12.04 上设置 ncurses 库

c - Main 端出现段错误,提供 GDB 输出

python - 在 django 生成的页面中包含 Handlebars 模板

python - 如何在 python 中逐行获取 MySQL ResultSet

您可以在函数内部取消引用 char 指针吗?

Python Selenium : "selenium.common.exceptions.WebDriverException: Message: chrome not reachable" local file

python - Elasticsearch - 检查索引是否存在时的身份验证错误

c - 为什么要多重定义?为什么没有定义其他引用?这真的很基本,我错过了什么?