Skip to content

Instantly share code, notes, and snippets.

@infrony
Created December 21, 2017 12:59
Show Gist options
  • Save infrony/1b89e5e21a431b1eed959efcb39d0198 to your computer and use it in GitHub Desktop.
Save infrony/1b89e5e21a431b1eed959efcb39d0198 to your computer and use it in GitHub Desktop.
Simple Alarm
import os
import time
dormir = input (" Segundos para activar la alarma :")
audio = ("start C:/code/python/alarm.mp3")#cambiar la ruta del archivo de audio
time.sleep (int(dormir))
os.system(audio)
z = input("Presione la tecla z para seguir durmiendo : ")
if z == "z":
time.sleep (5)
os.system(audio)
else :
print ("Alarma Cancelada ! (r,)")
print ("Alarma Apagada")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment