curses-library bug? Help!
teo
teo at crepido.com
Fri Aug 3 03:12:34 EDT 2001
Hi all! When i try to catch curses.KEY_ENTER, for example, getch() returns
something completley diffrent :)
well, i'll give you my code and explains below. ----------------------------------
import curses
curses.initscr()
win = curses.newwin(0,0,0,0)
win.keypad(1)
win.refresh()
while 1:
ch = win.getch()
if ch == curses.KEY_ENTER:
win.addstr(10,10,"Enter pressed")
win.refresh()
-------------------------------------
doesen't write anything at all on my screeen!(when i press 'enter', of course :)
The strange thing is, that other constants work, for example
curses.KEY_RESIZE, but no "keyboard-keys"(enter, tab, backspace)
When i run my application in pure textmode (no X server), it works,
but when i run my app in a terminalemulator, the mapping of the keys
failes. I don't know if it makes any sence, but I'm running Linux-mandrake.
Any suggestions?
Thanks,
Teodor
More information about the Python-list
mailing list