December 4, 2008
(This post is from my old, old, super old site. My views have changed over the years, hopefully my writing has improved, and there is now more than a handful of folks reading my site. Enjoy.)
Python 3.0 has been released.
I love me some python.
One quick tip- if you are using smtplib to send utf-8 email, it won't work in Python 3 unless you are using email.mime.text, like so:
import smtplib
import email.mime.text
msg = email.mime.text.MIMEText("Ümlaut", _charset="UTF-8")
smtp = smtplib.SMTP('localhost') smtp.sendmail('foo@foo.com', 'foo@fo.com', "Subject: This is your mail\n" + msg.as_string()) smtp.quit()