Navigation


RSS:   Blog / Fotos



Despertador python

lunes 13 agosto 2007 15:56:00, Linux,

#!/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)

facebook




About kope

Edo kopE
Edad: 30
Ubicacion actual:
B. Aires,
(Arg)
 

About Nero

Nero (okubi)
Edad: 57 @perro
Ubicacion actual:
Santiago, Chile



Categorias


Categorias Cookbook

Proyectos


Links