我似乎无法让ncurses pads在python(2.6、2.7和3.2)中工作。直接使用http://docs.python.org/howto/curses.html的代码,我甚至不能让它工作。非pad代码可以完美地工作。在
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)效果良好
你在重写键盘。尝试从}。在
pad
对象而不是主窗口对象scr
调用getch
方法并删除{相关问题 更多 >
编程相关推荐