Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: latin-1 -*-
- from time import gmtime, strftime
- import commands
- import gobject
- hora_actual = strftime("%H:%M", gmtime())
- print "
- Hora actual: ", hora_actual
- hora_futura = str(raw_input("
- Hora alarma: "))
- x_O = True
- while(x_O):
- if (hora_actual == hora_futura):
- print "Son iguales!!"
- x_O = False
- else:
- cmd = "sleep 2"
- salida = commands.getoutput(cmd)
- hora_actual = strftime("%H:%M", gmtime())
- cmd = "mplayer /home/kope/mp3/ElBastondelDiablo.mp3"
- print "Despierta !!!!"
- salida = commands.getoutput(cmd)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement