classification
Title: cannot catch KeyboardInterrupt when using curses getkey()
Type: behavior Stage: test needed
Components: Library (Lib) Versions: Python 2.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, akuchling, al65536
Priority: normal Keywords:

Created on 2007-03-23 20:50 by al65536, last changed 2010-11-12 20:57 by akuchling.

Files
File name Uploaded Description Edit
cursesbug.py al65536, 2007-03-23 20:51 test case
Messages (3)
msg31638 - (view) Author: al65536 (al65536) Date: 2007-03-23 20:50
#!/usr/bin/python
import curses

# Will works
scr=curses.initscr()
key=-1
try:
    try:
        key=scr.getkey()
    except:
        pass
except KeyboardInterrupt:
    key="CTRL-C"
curses.endwin()
print key

# Will fail
scr=curses.initscr()
key=-1
try:
    key=scr.getkey()
except KeyboardInterrupt:
    key="CTRL-C"
curses.endwin()
print key
msg31639 - (view) Author: al65536 (al65536) Date: 2007-03-23 20:51
python file attached
File Added: cursesbug.py
msg87792 - (view) Author: Daniel Diniz (ajaksu2) Date: 2009-05-15 02:36
Seems related to #706406 and #3180.
History
Date User Action Args
2010-11-12 20:57:33akuchlingsetassignee: akuchling ->
2009-05-15 02:36:58ajaksu2setversions: + Python 2.6, - Python 2.5
nosy: + ajaksu2

messages: + msg87792

type: behavior
stage: test needed
2008-01-21 13:50:17akuchlingsetassignee: akuchling
nosy: + akuchling
title: cannot catch KeyboardInterrupt when using curses getkey() -> cannot catch KeyboardInterrupt when using curses getkey()
2007-03-23 20:50:12al65536create