Python oprócz klawiatury

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

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