Joshua Cannell added the comment:

Yeah, so this looks like a behavior in Windows in which an EOFError is raised 
when a Ctrl + C is pressed, followed by a KeyboardInterrupt.

This post basically explains how to overcome it: 
http://stackoverflow.com/questions/31127652/cannot-catch-keyboardinterrupt-in-command-prompt-twice

def bing():
    try:
        input()
    except EOFError:
        print("Caught an EOFError")

try:
    bing()
    print("After bing")
except KeyboardInterrupt:
    print("Final KeyboardInterrupt")

Sorry for necro-ing an old issue.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26531>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to