[Web-SIG] sending multi-part responses from the web server
Lloyd Kvam
python at venix.com
Mon Mar 14 15:29:25 CET 2005
I have a web site that generates a document for download "on the fly".
It is requested through a submit button. I also generate the response
html along with the download. To create the multi-part response I used
the email modules MIME support.
Everything works, but to prevent quoted-printable encoding of the HTML,
I sued this line of code:
body.add_payload(MIMEText(
html, # this is the unicode response
_subtype='html',
_charset=None))
body is the MIMEMultipart container.
Should I have used a different MIME module or a different approach?
--
Lloyd Kvam
Venix Corp
More information about the Web-SIG
mailing list