如何在诅咒中合并两个不同的边界

2024-09-30 18:22:49 发布

您现在位置:Python中文网/ 问答频道 /正文

使用python的诅咒,我怎样才能无缝地合并两个边界?例如:

import curses

screen = curses.initscr()
curses.curs_set(0)
screen.border()
screen.refresh()

awindow =  curses.newwin(3, curses.COLS, 0, 0)
awindow.border()
awindow.refresh()

while True:
    curses.noecho()
    c = screen.getch(1, 1)
    if c == ord('q') or c == ord('Q'):
        break

curses.endwin()

这将创建两个窗口,但在边界相交的两个点上存在不连续性。我怎样才能去掉那个

enter image description here


Tags: importscreen无缝refreshcurses边界colsset
1条回答
网友
1楼 · 发布于 2024-09-30 18:22:49

可以通过使用ACS_LTEEACS_RTEE字符覆盖这些间隙来实现这一点。python curses参考部分提供了更多信息指向ncurses手册页面,说

If you’re in doubt about the detailed behavior of the curses functions, consult the manual pages for your curses implementation, whether it’s ncurses or a proprietary Unix vendor’s. The manual pages will document any quirks, and provide complete lists of all the functions, attributes, and ACS_* characters available to you.

在本例中,信息在^{}手册页中

相关问题 更多 >