D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Tuesday teaser: httpd



On Tuesday 11 December 2001 12:57 pm, Steve Marvell wrote:
> On Tue, Dec 11, 2001 at 12:14:04PM +0000, Tony Atkin wrote:
> > #! /usr/bin/python
> > print "Content-Type: text/html"     # HTML is following
> > print                               # blank line, end of headers
> > print "<HTML><HEAD>"
> > print "<TITLE>CGI script output</TITLE>"
> > print "</HEAD><BODY>"
> > print "<H1>Hello World</H1>"
> > print "</BODY></HTML>"
>
> You mean you can't do:
>
> print <<HTML;
> Content-Type: text/html
>
> <HTML><HEAD>
> <TITLE>CGI script output</TITLE>
> </HEAD><BODY>
> <H1>Hello World</H1>
> </BODY></HTML>
> HTML
>

nope, but I can do:

print """
<HTML><HEAD>
<TITLE>CGI script output</TITLE>
</HEAD><BODY>
<H1>Hello World</H1>
</BODY></HTML>"""

Tony

-- 
--------------------------------------------------------------------------
Tony Atkin
Geography Department, The College of St Mark and St John, Plymouth
email:	tone_pl@xxxxxxxxxxx, tatkin@xxxxxxxxxxxx
tel:	01752 636700 ext. 4316
--------------------------------------------------------------------------

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly