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