Reputation: 16860
My server supports Python 2.7. It is located under /usr/bin/python2.7.
What do I have to take care of when trying to execute a cgi script ? I don't want to use Django or anything like that. I only want the script to be running and the text that was printed within the script to be shown as it was an html file.
print """<html>
<body>
Hi !
</body>
</html>"""
should be simply shown as
Hi !
in the browser.
Upvotes: 1
Views: 1236
Reputation: 10235
To get a CGI script to run you have to setup your webserver to run the CGI scripts.
It pretty much depends on the server you are running:
CGI and Apache explains the basics for CGI and apache.
Another good resource is probably the web programming guide in the python documentation: Python web programming
Upvotes: 2