On 18/02/05, Peter Otten ([EMAIL PROTECTED]) wrote:
> Rory Campbell-Lange wrote:
>
> > #!/usr/bin/python
> > import cgi
> > print "Content-type: text/html\n\n"
> > print "hi"
> >
> > Gives me the following in my browser:
> >
> > '''
> > hi
> > Content-type: text/html
> >
> >
> > hi
> > '''
> >
On Fri, 18 Feb 2005 18:36:10 +0100, Peter Otten <[EMAIL PROTECTED]> wrote:
Rory Campbell-Lange wrote:
#!/usr/bin/python
import cgi
print "Content-type: text/html\n\n"
print "hi"
Gives me the following in my browser:
'''
hi
Content-type: text/html
hi
'''
Why are there two 'hi's?
You have chosen a ba
Rory Campbell-Lange wrote:
#!/usr/bin/python
import cgi
print "Content-type: text/html\n\n"
print "hi"
Gives me the following in my browser:
'''
hi
Content-type: text/html
hi
'''
Why are there two 'hi's?
Thanks,
Rory
gives just one hi for me.
--
http://mail.python.org/mailman/listinfo/python-list
m wrote:
gives just one hi for me.
"
Content-type: text/html
hi
"
I get this
--
http://mail.python.org/mailman/listinfo/python-list
Rory Campbell-Lange wrote:
> #!/usr/bin/python
> import cgi
> print "Content-type: text/html\n\n"
> print "hi"
>
> Gives me the following in my browser:
>
> '''
> hi
> Content-type: text/html
>
>
> hi
> '''
>
> Why are there two 'hi's?
You have chosen a bad name for your script: cgi.py.
It i
Not sure about the repeated hi. But you are supposed to use \r\n\r\n, not
just \n\n according to the HTTP specification.
#!/usr/bin/python
import cgi
print "Content-type: text/html\n\n"
print "hi"
Gives me the following in my browser:
'''
hi
Content-type: text/html
hi
'''
Why are there two 'hi's
#!/usr/bin/python
import cgi
print "Content-type: text/html\n\n"
print "hi"
Gives me the following in my browser:
'''
hi
Content-type: text/html
hi
'''
Why are there two 'hi's?
Thanks,
Rory
--
Rory Campbell-Lange
<[EMAIL PROTECTED]>
--
http://mail.python.org/mailman/listinfo/python-list