This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jecanne
Recipients jecanne, paul.moore, steve.dower, tim.golden, tjguk, vstinner, zach.ware
Date 2016-03-10.17:00:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1457629247.39.0.490463861808.issue26531@psf.upfronthosting.co.za>
In-reply-to
Content
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 True:
    try:
        data = raw_input()
        print data
    except KeyboardInterrupt:
        print "Interrupt!"
    
Does not print "data" if a KeyboardInterrupt is received during raw_input.

Unfortunately, I can't use python 3 as my organization currently uses 2 in their production environment.
History
Date User Action Args
2016-03-10 17:00:47jecannesetrecipients: + jecanne, paul.moore, vstinner, tim.golden, zach.ware, steve.dower, tjguk
2016-03-10 17:00:47jecannesetmessageid: <1457629247.39.0.490463861808.issue26531@psf.upfronthosting.co.za>
2016-03-10 17:00:47jecannelinkissue26531 messages
2016-03-10 17:00:47jecannecreate