
Untitled
By: a guest on
Jul 11th, 2012 | syntax:
None | size: 0.82 KB | hits: 14 | expires: Never
initial_input_list = os.popen("ls /home/daniel/log | grep -v \# | grep -v \& | grep -v server | grep -v core\.wee").readlines()
buffer_list = []
for s in initial_input_list:
buffer_list.append(s.strip())
oldnotifications = {}
while 1:
try:
for b in buffer_list:
i="tail -n1 /home/daniel/log/" + b
title,message,old_message = makeMessage(i)
try:
if oldnotifications[b] == old_message:
pass
else:
print message
oldnotifications[b] = old_message
pushNotification(title, message, "notification-message-im")
except:
oldnotifications[b] = old_message
time.sleep(.05)
except KeyboardInterrupt:
sys.exit(0)