Kod: Zaznacz cały
#-*- coding: utf-8 -*-
import codecs
import os
import string
username="login"
password="hasło"
com="wget -O - https://"+username+":"+password+"@mail.google.com/mail/feed/atom --no-check-certificate"
temp=os.popen(com)
msg=temp.read()
index=string.find(msg,"")
index2=string.find(msg,"")
fc=int(msg[index+11:index2])
if fc==0:
print "brak nowych wiadomości"
elif fc==1:
print "1 nowa wiadomość"
elif fc > 1 and fc < 5:
print str(fc)+" nowe wiadomości"
else:
print str(fc)+" nowych wiadomości"
Kod: Zaznacz cały
${execi 600 python ~/.scripts/gmail.py}
Będę wdzięczny za pomoc.