Crash in curses stdscr.getkey?
Erik Max Francis
max at alcyone.com
Mon Nov 4 17:53:10 EST 2002
I'd receive a report from someone using CAGE (my cellular automata
explorer in Python which uses curses) that he was getting crashes; he
ran SuSE. He fiddled around fond a workaround. If he changed the line
from
char = self.stdscr.getkey()
to
char = self.stdscr.getch()
if 1 <= char <= 255:
char = chr(char)
he found that the crash went away. I had presumed it was just an
isolated incident (i.e., he had a corrupt curses library on his system
or something similar), but just the other day another user reported the
same crash, and when I sent them the workaround, it went away.
Both users use Linux; the first used SuSE and the latter used Red Hat.
I use Slackware, and haven't seen any such crash (though both code
fragments work fine). The first was using Python 2.2.1; the latter was
using Python 2.2.2.
Is this a known problem, or should I try to get the endusers to research
it further to submit bugs to the appropriate parties? (I can't tell
whether it's a curses problem or a Python glue problem.)
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ Only the winners decide what were war crimes.
\__/ Gary Wills
Max Pandaemonium / http://www.maxpandaemonium.com/
A sampling of Max Pandameonium's music.
More information about the Python-list
mailing list