Python excepto el teclado.

try:
	#your code here
    print("Hello world!")

except KeyboardInterrupt:
	#your code here
    print("Keyboard interrupt")
Robin Dabank