gpt4 book ai didi

python - Curses newwin 和 subwin 的区别

转载 作者:太空狗 更新时间:2023-10-29 21:53:21 24 4
gpt4 key购买 nike

我似乎找不到任何关于 curses.newwin 和 curses.subwin 之间区别的信息

你知道吗?

我想将屏幕分成 3 个不同的部分,更新时间不同(并非每次按键都必须更新所有内容)。 这是正确的方向吗?

谢谢

最佳答案

Docu 不适用于 Python,但可以帮助您。

Calling newwin() creates and returns a pointer to a new window with the given number of lines and columns. The upper left-hand corner of the window is at line begin_y, column begin_x. If either nlines or ncols is zero, they default to LINES-begin_y and COLS-begin_x. A new full-screen window is created by calling newwin(0,0,0,0).

Calling subwin() creates and returns a pointer to a new window with the given number of lines, nlines, and columns, ncols. The window is at position (begin_y, begin_x) on the screen. (This position is relative to the screen, and not to the window orig.) The window is made in the middle of the window orig, so that changes made to one window will affect both windows. The subwindow shares memory with the window orig. When using this routine, it is necessary to call touchwin() or touchline() on orig before calling wrefresh() on the subwindow.

http://www.mkssoftware.com/docs/man3/curs_window.3.asp

关于python - Curses newwin 和 subwin 的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14200506/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com