Python: how to transform the Thunderbird address book into a simple list of email addresses
Python is a high-level programming language interpreted, object oriented, suitable, Other uses, to develop distributed applications, scripting, and numerical computation.
Python programming language, consider a very powerful and versatile and that is why I used it to transform the address book of e-mail Mozilla Thunderbird in a list in a usable newsletter.
Here is my first screencast my blog so you can better understand what I mean, Click on the button-shaped square in the lower right of the video to the left of the volume to view full screen…Good vision and tell me what you think.
Code:
from string import *
def findrev(stro,strf,pos):
i = pos
while stro[i]!=strf:
i = i - 1
return i
fn = open("rubrica.csv")
fm = open("NewsLetter.txt","w")
while 1:
line = fn.readline()
if not line:
break
else:
posc = find(line,"@",0)
posv1 = find(line,",",posc)
posv = findrev(line,",",posc)
fm.writelines(line[posv+1:posv1]+','+'\n')
pass # do something
fm.writelines("bruni.marco@gmail.com")
fm.close()
fn.close()
print "Finito, ho creato la NewsLetter"





Are Marco Bruni I live in San Benedetto del Tronto (AP) and a C # Developer, .NET, Java, Php, Python and Wordpress. I'm also a Windows and Linux systems, and IT Consultant. This has always been my passion with me and also my work 20 years. 

Recent Comments