(n) 诅咒python中的pad不工作

2024-06-17 10:39:47 发布

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

我似乎无法让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)效果良好


Tags: ofthe代码orghttpdocsrefreshcurses