Created
November 19, 2012 14:54
-
-
Save yfwu/4111092 to your computer and use it in GitHub Desktop.
A python daemon use zenity to notice user his setting time.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys, time | |
setting = raw_input('Please input your time setting:') | |
newpid = os.fork() | |
if newpid == 0: | |
while True: | |
time.sleep(10) | |
if setting <= time.strftime("%H%M",time.localtime(time.time())): | |
os.system('zenity --error --text="Alert!"') | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment