Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: latin-1 -*-
  3.  
  4. from time import gmtime, strftime
  5. import commands
  6. import gobject
  7.  
  8. hora_actual = strftime("%H:%M", gmtime())
  9. print "
  10. Hora actual: ", hora_actual
  11. hora_futura = str(raw_input("
  12. Hora alarma: "))
  13. x_O = True
  14.  
  15. while(x_O):
  16.   if (hora_actual == hora_futura):
  17.     print "Son iguales!!"
  18.     x_O = False
  19.   else:
  20.     cmd = "sleep 2"
  21.     salida = commands.getoutput(cmd)
  22.     hora_actual = strftime("%H:%M", gmtime())
  23.  
  24.   cmd = "mplayer /home/kope/mp3/ElBastondelDiablo.mp3"
  25. print "Despierta !!!!"
  26. salida = commands.getoutput(cmd)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement