- import os
- import string
- #Enter your username and password below within double quotes
- # eg. username="username" and password="password"
- username="username"
- password="password"
- ttext=""
- title=""
- ntext=[]
- nam=[]
- mtext=[]
- mes=[]
- sum=[]
- ema=[]
- nom=""
- tot=0
- rtot=0
- 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,"<title>")
- index2=string.find(msg,"</title>")
- title=msg[index+25:index2]
- index=index2
- index=string.find(msg,"<fullcount>")
- index2=string.find(msg,"</fullcount>")
- fc=msg[index+11:index2]
- if(int(fc)>20):tot=20
- else: tot=(int(fc))
- rtot=tot
- if (int(fc)==1):
- print ""+fc+" New"
- elif rtot==0:
- print "0 New"
- elif rtot>1:
- print ""+fc+" New"
- else:
- print "Error..."
Posted by PrimoTurbo on Thu 26 Jun 16:36
report abuse | download | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.