POP3 Mail Download

Kevin F neurogasm at gmail.com
Sat Mar 18 17:24:05 EST 2006


Dennis Lee Bieber wrote:
> On Sat, 18 Mar 2006 16:44:44 -0500, Kevin F <neurogasm at gmail.com>
> declaimed the following in comp.lang.python:
> 
> 
>> However, if I try to actually download the messages themselves, my 
>> python editor highlights 'msgSize' and says "invalid syntax" when I run 
>> the following subsequent lines of code:
>>
>>
>> ------------------------
>> emails = []
>> for msg in messagesInfo:
>>           msgNum = int(split(msg, " ")[0]
>>          msgSize = int(split(msg, " ")[1]
>>          if(msgSize < 20000):
>>              messages = server.retr(msgNum)[1]
>>              messages = join(message, "\n")
>>              emails.append(message)
> 
> 	Look very closely at your indentation
> 
> 

I fixed the indentation to:

emails = []
for msg in messagesInfo:
         msgNum = int(split(msg, " ")[0]
         msgSize = int(split(msg, " ")[1]
             if(msgSize < 20000):
                 messages = server.retr(msgNum)[1]
                 messages = join(message, "\n")
                 emails.append(message)


and it still doesn't work, what's wrong?



More information about the Python-list mailing list