Message261512
| 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. |
|