草庐IT

Setupterm

全部标签

python - Setupterm 找不到终端,在 Python 程序中使用 curses

我正在尝试使用Python(使用PyCharm2.0)运行一个简单的curses脚本。这是我的脚本:importcursesstdscr=curses.initscr()curses.noecho()curses.cbreak()stdscr.keypad(1)while1:c=stdscr.getch()ifc==ord('p'):print("Ipressedp")elifc==ord('q'):breakcurses.nocbreak();stdscr.keypad(0);curses.echo()curses.endwin()当我从我的IDE(PyCharm2)运行它时,我收到