Howdy,

Upon further investigation, the KeyboardInterrupt exception is
actually caught by a second exception handler.  The problem has
actually been reported upstream as

 
http://sourceforge.net/tracker/index.php?func=detail&aid=771429&group_id=5470&atid=105470

but it was closed for lack of a reproducible test case.  I've attached
a file that exhibits the problem.  In it, the try in main catches the
exception returned by getkey, whereas the exception handler in
curses.wrapper catches the KeyboardInterrupt.

I think the upstream bug should either be reopened or a new one filed.

-- 
Matt
#!/usr/bin/env python

import curses

def main(stdscr):
    try:
        stdscr.getkey()
    except:
        pass

curses.wrapper(main)

Attachment: signature.asc
Description: Digital signature

Reply via email to