1

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.

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

1 Comment

The first link was exactly what I searched for ! Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.