Re: Newbie CGI problem

2005-02-20 Thread Rory Campbell-Lange
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 > > ''' > >

Re: Newbie CGI problem

2005-02-18 Thread aurora
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

Re: Newbie CGI problem

2005-02-18 Thread m
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

Re: Newbie CGI problem

2005-02-18 Thread m
m wrote: gives just one hi for me. " Content-type: text/html hi " I get this -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie CGI problem

2005-02-18 Thread Peter Otten
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

Re: Newbie CGI problem

2005-02-18 Thread aurora
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

Newbie CGI problem

2005-02-18 Thread Rory Campbell-Lange
#!/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