【发布时间】:2012-09-15 22:28:03
【问题描述】:
我似乎无法让 ncurses pad 在 python(2.6、2.7 和 3.2)中工作。直接使用http://docs.python.org/howto/curses.html 的代码我什至无法让它工作。非填充代码完美运行。
import curses
def func(scr):
pad = curses.newpad(100, 100)
pad.addstr(0,0, "Testing")
# Displays a section of the pad in the middle of the screen
pad.refresh( 0,0, 5,5, 10,10)
scr.refresh()
scr.getch()
if __name__ == '__main__':
curses.wrapper(func)
问题可能是什么?卸下焊盘(并将焊盘更改为 scr)工作正常
【问题讨论】:
-
Linux、Ubuntu 12.04 用于 2.7 和 3.2 以及 Debian 6.0 用于 2.6