Catch Keyboard interrupt exception : Try : Statement PYTHON TUTORIALS


PYTHON TUTORIALS » Statement » Try »

 

Catch Keyboard interrupt exception


try:
    name = raw_input("Enter your name: ")
    print "You entered: " + name
except KeyboardInterrupt:
    print "You hit control-c"



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Statement
» Try