simple script using CGIHTTPServer?

philregion bob.ducharme at lexisnexis.com
Thu Mar 25 21:13:49 EST 2004


Let's say I've got the following little script called test1.py: 

print "Content-type: text/html\n\n"
print "<html><body>"
print "<h1>Hello World</h1>"
print "</body></html>"

I want to run a script that takes advantage of CGIHTTPServer so that I
can send a browser to http://localhost:8081/test1.py and see the
results of the script above. What's the shortest such script that I
need to make this work? After some web searching, I found
http://manatee.mojam.com/~skip/python/web-server.py and
http://www.doc.ic.ac.uk/~tb100/project/viewcvs/standalone.py but
couldn't get either to work. 

thanks,

Bob





More information about the Python-list mailing list