Running Python code on a hosted server

Python just like any other back end programming language needs libraries in order to function. In order to run your python code, it has to be hosted on a server. It can either be your local server or an externally hosted server.

Fortunately servers already have the Python libraries pre-installed and configured. So one does not need to Install anything in order to make it run.

To execute your python files on the server it has to be placed in a special folder. It is called the cgi-bin folder present under the home directory. As you place these files in the folder one must ensure that the file extensions are .cgi  and not .py.

Once you get this far you are now in a good position to play around with your code and see how it works! 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s