Login to Members Area

Choose the service you want to log in
24x7x365 Presence
Live Chat

Hosting Blog


Python scripts on shared Linux servers

Python supports CGI scripts on shared Linux servers.

To run Python scripts you should first make sure of the following steps:

Step 1: Add cgi-bin as cgi-dir in the control panel on the web services section for the domain.
Step 2: Add the .py extension for Python to run against CGI on the web services section for the domain.
Step 3: Place the script inside the cgi-bin directory and make sure that the cgi-bin directory and files in it have permission of 755 to run.
Step 4: Use the shebang at the top => #!/usr/bin/python and then write the script you want and then run it on the browser using the url :-


That's it! Your Python script should work fine if you have followed the steps above.

Sachin Thursday 11 July 2013 - 4:33 pm | | Default
Used tags: , , , ,

No comments

(optional field)
(optional field)

Comment moderation is enabled on this site. This means that your comment will not be visible until it has been approved by an editor.

Remember personal info?
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.