如何在 Python 中使用 curses 跳过一行?
How to skip a line using curses in Python?
我正在寻找如何使用 curses 跳过一行。我试过了
screen.addchr('\n')
和 screen.addstr("\n")
但它没有用。我该怎么做?
如果您使用 screen.addch
or screen.addstr
in curses to pass a newline, it clears the remainder of the line. Instead, if you want to move down a line, you should get the current position using screen.getyx
and use screen.move
移动到下一行(通过将 1
添加到 y 值)。
延伸阅读:
我正在寻找如何使用 curses 跳过一行。我试过了
screen.addchr('\n')
和 screen.addstr("\n")
但它没有用。我该怎么做?
如果您使用 screen.addch
or screen.addstr
in curses to pass a newline, it clears the remainder of the line. Instead, if you want to move down a line, you should get the current position using screen.getyx
and use screen.move
移动到下一行(通过将 1
添加到 y 值)。
延伸阅读: