Re: [email/quoprimime.py] AttributeError: 'tuple' object has no attribute 'lstrip'

2009-01-06 Thread Gilles Ganault
On Mon, 05 Jan 2009 17:54:19 -0500, Terry Reedy wrote: >> for email in rows: >> To = email Thanks guys. Turns out email is a tuple, so here's how to extract the columns: for email in rows: email=email[0] -- http://mail.python.org/mailman/listinfo/python-list

Re: [email/quoprimime.py] AttributeError: 'tuple' object has no attribute 'lstrip'

2009-01-05 Thread Terry Reedy
il #print To #(u'du...@acme.com',) Why are these line comments? Why is the string enclosed in a tuple? #AttributeError: 'tuple' object has no attribute 'lstrip' True. Only strings have lstrip method. #server.sendmail(From,[To],msg.as_string(

Re: AttributeError: 'tuple' object has no attribute 'lstrip'

2009-01-05 Thread John Machin
te(sql)) > for email in rows: >         To = email >         msg['To'] = email > >         #print To >         #(u'du...@acme.com',) That looks like a tuple to me. What does it look like to you? > >         #AttributeError: 'tuple' object ha

Re: [email/quoprimime.py] AttributeError: 'tuple' object has no attribute 'lstrip'

2009-01-04 Thread Chris Rebert
list(cursor.execute(sql)) > for email in rows: >To = email >msg['To'] = email > >#print To >#(u'du...@acme.com',) > >#AttributeError: 'tuple' object has no attribute 'lstrip' >#ser

[email/quoprimime.py] AttributeError: 'tuple' object has no attribute 'lstrip'

2009-01-04 Thread Gilles Ganault
ver = smtplib.SMTP("smtp.acme.com") sql="SELECT email FROM people WHERE email IS NOT NULL" rows=list(cursor.execute(sql)) for email in rows: To = email msg['To'] = email #print To #(u'du...@acme.com',) #Attribute