Tips n Tricks

How to run Python scripts in your shared hosting server

Direct to the how-to 🙂

  1. First make sure your hosting supports Python. Now a days almost all shared hosting providers support Python.
  2. 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
  3. Make sure to include two print statements which will print the content-type and an empty line.
  4. Now put the script in cgi-bin directory inside your root public folder, usually public_html
  5. Change the permission of the script to 0755
  6. Try to browse now 🙂

What is the difference between the variables of Python and other language

If you are from C/C++/Java and started learning Python, this should be an interesting topic for you.

In languages like C, C++, Java, PHP etc a variable is a memory location where its value is saved. When you copy a variable into another variable, both of them still in existence and you can use both of them.

But in Python, its different. As a matter of fact Python don’t have any variables, it has ‘name’ or ‘identifier’ attached to an object (everything in Python is an object).

Let me clear this using an example:

How to prepare bootable flash drive of Windows 7 and Ubuntu

There are bunch of articles and softwares available online to achieve this. So instead of writing another tutorial, I am sharing the available tutorials which I have used often when I needed.

Here are the links:

Make your own bootable Windows 7 Flash Drive

Make bootable Ubuntu using Flash Drive

Actually this is very much easy, and same for all distro. all are free n opensource.

I hope it helps, if you need any help, let me know.

1 of 4
1234