View Single Post
Old Feb 17th, 2008, 10:06 PM   #19
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,799
Rep Power: 5 Sane will become famous soon enough
Re: Running python scripts on localhost

Okay, so it looks like you don't need that first line. It should be obvious to try this as the start of your code then:

import cgitb
import cgi
cgitb.enable()

print "Content-type: text/html\n\n"

To replace what I proposed earlier:

#!c:/python24/python

import cgitb
import cgi
cgitb.enable()

print "Content-type: text/html\r"
print "\r"
Sane is offline   Reply With Quote