curses

Setupterm could not find terminal, in Python program using curses

大城市里の小女人 提交于 2019-11-26 11:25:02
问题 I am trying to get a simple curses script to run using Python (with PyCharm 2.0). This is my script: import curses stdscr = curses.initscr() curses.noecho() curses.cbreak() stdscr.keypad(1) while 1: c = stdscr.getch() if c == ord(\'p\'): print(\"I pressed p\") elif c == ord(\'q\'): break curses.nocbreak(); stdscr.keypad(0); curses.echo() curses.endwin() When I run this from my IDE (PyCharm 2) I get the following error: _curses.error: setupterm: could not find terminal Process finished with

What is needed for curses in Python 3.4 on Windows7?

别来无恙 提交于 2019-11-26 09:39:00
问题 I have a running Python 2.7/3.4 installation on my Windows 7 (x64) machine. I would like to test curses on Windows. Curses is installed but not working: >>> import curses Traceback (most recent call last): File \"<stdin>\", line 1, in <module> File \"C:\\Tools\\Python3.4.2\\lib\\curses\\__init__.py\", line 13, in <module> from _curses import * ImportError: No module named \'_curses\' The documentation says: The Windows version of Python doesn’t include the curses module. A ported version

Curses alternative for windows [closed]

﹥>﹥吖頭↗ 提交于 2019-11-26 06:35:02
问题 Is there any alternative of the curses module for python to use in windows? I looked up in the python documentation, but there its mentioned that its for using in unix. I am not much familiar with these, so is there some way to use curses module in windows or is there some similar module specially for windows? [I am using Python 3.3] 回答1: Then you're out of luck i'm afraid. There's no real cross-platform version or port of curses/ncurses, there is a "dialogue" port which works, but it's

Canonical vs. non-canonical terminal input

夙愿已清 提交于 2019-11-25 22:48:33
问题 I am studying for an exam and I am confused as to how canonical vs. non-canonical input/output works in Unix (e.g., curses). I understand that there is a buffer to which \"line disciplines\" are applied for canonical input. Does this mean that the buffer is bypassed for non-canonical input, or does it simply mean that no line disciplines are applied? How does this process differ for input and output operations? In the curses programs I have worked with that demonstrate canonical input, the