About mhtml

Frank Abel Cancio Bello FRANKABEL at tesla.cujae.edu.cu
Sun Nov 7 18:31:28 CET 2004


Hi all!
I need to make a cgi in python that send mhtml instead of html to client web
browser. With Internet Explorer I save a .mhtm file and then build the
following python script. But this not work. Some suggestion?. All I
need is an example.

print """Content-Type: multipart/related; 
boundary="----=_NextPart_000_0000_01C4C4CB.1CCA6D50"; type="text/html"

------=_NextPart_000_0000_01C4C4CB.1CCA6D50
Content-Type: text/html;
 charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Content-Location:
file://C:\Documents%20and%20Settings\temp\Desktop\test.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.3790.218" name=3DGENERATOR></HEAD>
<BODY><IMG=20
src=3D"file:///C:/Documents%20and%20Settings/temp/Desktop/test.png"></BOD=
Y></HTML>

------=_NextPart_000_0000_01C4C4CB.1CCA6D50
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Location:
file:///C:/Documents%20and%20Settings/temp/Desktop/test.png

iVBORw0KGgoAAAANSUhEUgAAACIAAAAjCAIAAAB+eU8wAAAAAXNSR0IArs4c6QAAAARnQU1BAACx
jwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAKJJREFU
SEvtVtEOgCAItP//aLM53Q1QkRkPBeuhDDvuDrUrpZxcosA4XB4Yj2AOVALGJnJ4Y9CNiZbPBayW
v8AUyvoQk1WiecD0Qioh8khG+FsyS9g6u1CdDdKq9/MR/EKrYNxpCIMbOVbKa0I797yZmCQytrMh
VR8WjevGKxU13GgB/aIZZaq8+QTMOz8hcXqeOD3Dm3UfrTMMTvApAbMt4w1iaNSBMh1elwAAAABJ
RU5ErkJggg==

------=_NextPart_000_0000_01C4C4CB.1CCA6D50--


"""
__________________________________________

Aniversario 40 de la CUJAE
 
Visite:
 
XII Convencion de Ingenieria y Arquitectura
http://www.cujae.edu.cu/eventos/convencion/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20041107/c7b808c7/attachment.html>


More information about the Python-list mailing list