Can´t Surf Python Pages in Windoze
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Fri Dec 26 14:00:20 EST 2008
En Fri, 26 Dec 2008 15:11:44 -0200, Victor Subervi
<victorsubervi at gmail.com> escribió:
> On 12/26/08, Tino Wildenhain <tino at wildenhain.de> wrote:
>>> print "Content-Type: text/html"
>>> print
>>> print """
>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
>>> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
I think there should be only one blank line between header and content,
you have two (so the document contains an empty line before the doctype
declaration, and I think this is invalid).
>>> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
>>> <head>
>>> </head>
>>> <body>
>>> Yeah
>>> </body>
>>> </html>"""
The title tag (in head) is mandatory (although this should not prevent it
from working)
>> this could be fine if called in CGI context.
>
> Can you state clearly what "CGI context" means¿
Tino W. surely meant to say:
- if you have a web server running
- and it is capable of handle CGI scripts
- and you have configured it to handle CGI scripts
- and you have configured it to run the code above as a CGI script in
response to certain request
- and you pointed your browser to the right server, at the right port, at
the right url
- then, the code above should run and you should get a nice HTML page with
the word Yeah in it.
> Should I be importing a CGI
> module¿ I pulled this code from a page that was working. If it had an
> importation of something CGI, I believe I would have tested that with all
> the other things that were imported that I tested, but perhaps not. I am
> not
> at my home computer to test, and will not be back online for a week.
No, the code above doesn't require other modules to run.
> I am not worried about Zope now, but the above code, yes.
You're talking about two totally separate projects, I presume. The above
code should not be used with Zope.
--
Gabriel Genellina
More information about the Python-list
mailing list