What's wrong with my script?

Roman Suzi rnd at onego.ru
Fri Sep 14 15:51:10 EDT 2001


On Fri, 14 Sep 2001, Michael Landmann wrote:

>Hi, I wrote this script and saved it as index.cgi, but it doesn't work.
>Idea?
>
>#! /usr/bin/python
>
>print "<html>"
>print "<head>"
>print "<title>Aramedis.com</title>"
>print "<meta http-equiv="refresh" content="5;
>URL=http://www.aramedis.de/de/index.htx">"
>
>print "</head>"
>
>print "<body bgcolor=#000000>"
>print "hallo"
>print "</body>"
>print "</html>"

May be it is better to put it all into triple-quotes?

print """Content-type: text/html

<html><head>
<title>Aramedis.com</title>
<meta http-equiv="refresh" content="5;URL=http://www.aramedis.de/de/index.htx">
</head>
<body bgcolor=#000000>
hallo
</body>
</html>"""


This way you will get rid of \"-escapes!

Sincerely yours, Roman Suzi
-- 
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Friday, September 14, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "URA Redneck if you own a homemade fur coat." _/






More information about the Python-list mailing list