Can someone help please

Gary woodygar at
Thu Jul 21 19:02:34 CEST 2011

Can someone help me with this code below please,
For some reason it will not send me the first text file in the directory.
I made up an empty file a.txt file with nothing on it and it sends the 
files i need but would like to fix the code.

total = ' '
for i in os.listdir('.'):
   if '.txt' in i:
     f = open(i, 'r')
     total +=
message = """\
Subject: %s

"""% (SUBJECT,total)

More information about the Python-list mailing list