Direct to the how-to 🙂
- First make sure your hosting supports Python. Now a days almost all shared hosting providers support Python.
- Find your python installation location, this is required for “shebang” line added at the top of your python script. Usually this is /usr/bin/python or /usr/local/bin/python
- Make sure to include two print statements which will print the content-type and an empty line.
- Now put the script in cgi-bin directory inside your root public folder, usually public_html
- Change the permission of the script to 0755
- Try to browse now 🙂