plain text parsing to html (newbie problem)
João
joaopcf at gmail.com
Fri Dec 11 10:22:49 EST 2009
Lie Ryan wrote:
> You can set MIME type and encoding from the MIME constructor
> email.mime.Text.MIMEText("<b>Bold Text</b>", "html", "utf-8")
>
> are you importing "import mime" or "import email.mime" or "import
> email.MIMEMultipart"?
Hi Lie.
I was importing as,
'from email.mime.text import MIMEText' which was returning that error
because I don't have
a mime subdir in my /usr/lib64/python2.4/email/ as I was expecting.
'import email.MIMEMultipart' worked perfectly (the mime methods are in
the /email/ root).
I'll try to redo my script right after I get some urgent things done.
Thanks :)
More information about the Python-list
mailing list