R
ruka_at_
Hi,
why is KeyboardInterrupt not caught (xp)?
import sys
try:
inp = sys.stdin.read()
except (KeyboardInterrupt, SystemExit):
print "kbd-interr,SystemExit"
except EOFError:
print "eof encountered"
except:
print "caught all"
self.showtraceback()
print "normal end"
result after script startet and ^C hit:
Traceback (most recent call last):
File "C:\work\py_src\ctrl_test.py", line 11, in ?
print "normal end"
KeyboardInterrupt
br Rudi
why is KeyboardInterrupt not caught (xp)?
import sys
try:
inp = sys.stdin.read()
except (KeyboardInterrupt, SystemExit):
print "kbd-interr,SystemExit"
except EOFError:
print "eof encountered"
except:
print "caught all"
self.showtraceback()
print "normal end"
result after script startet and ^C hit:
normal endctrl_test.py
Traceback (most recent call last):
File "C:\work\py_src\ctrl_test.py", line 11, in ?
print "normal end"
KeyboardInterrupt
br Rudi