[issue26531] Keyboard Interrupts not caught when used within a class method on Windows 10

2016-03-10 Thread TJG
TJG added the comment: If I run your code, it does what I expect: pressing Ctrl-C produces "Interrupt", doesn't print the data returned from raw_input, and doesn't produce a stacktrace. I'm not on Win10 and it's entirely possible that this area of the MS CRT has been reworked: it's a bit quirky

[issue26531] Keyboard Interrupts not caught when used within a class method on Windows 10

2016-03-10 Thread Joshua Cannell
Joshua Cannell added the comment: Hi, Thanks for the quick response. I tried your code, it doesn't capture the keyboard interrupt, so the method doesn't seem to be needed. Also, the code doesn't carry on if interrupt was received, but instead produces the stack traceback. For example: while

[issue26531] Keyboard Interrupts not caught when used within a class method on Windows 10

2016-03-10 Thread STINNER Victor
STINNER Victor added the comment: Please try Python 3, I recall that we fixed bugs on input() on Windows related to CTRL+c. -- nosy: +haypo ___ Python tracker

[issue26531] Keyboard Interrupts not caught when used within a class method on Windows 10

2016-03-10 Thread TJG
TJG added the comment: I don't have Win10 to test with, but can you confirm that the method is necessary for the code to fail? IOW does this fail equally? while True: try: raw_input() except KeyboardInterrupt: print "Interrupt!" Also, do I assume that the code simply carries on

[issue26531] Keyboard Interrupts not caught when used within a class method on Windows 10

2016-03-10 Thread Joshua Cannell
New submission from Joshua Cannell: There seems to be an issue capturing keyboard interrupts on Windows 10 when using raw_input() inside of a class method w/python 2.7.x. So far I have tested this on: 2.7.11 x86 on Windows 10 x64 - Does not capture (Traceback) 2.7.11 x64 on Windows 10 x64 -