Starting+Out

__**Back to Learning Python**__


 * Obtaining and Installing Python**

Mac OS X and many Linux distributions come with a version of Python pre-installed. For the purposes of this wiki, these versions are more than suitable. Should you choose to install another version, it is strongly urged to leave the pre-installed version alone as multiple versions of Python may co-exist on a system without any issue. Removing a pre-installed version will likely cause unintended serious stability issues with your system.

Current versions of Python are available for Mac OS X, Linux, and Windows systems at the Python download page. The current versions as of this writing are 2.x.x and 3.x.x. As of early 2012, it is advised to stay with the 2.x.x version for your system. Until you increase your own experience with Python that you can personally make the judgement call for 3.x.x, stay with 2.x.x.


 * Obtaining and Installing an Editor**

While it is possible to simply type commands into the python interpreter, this is a very bad idea for the beginner. Instead, we will use a text editor. One main advantage to choosing this method is that you can easily save and load your program for later use.

There exist many different programming editors, for our purposes we will choose the free version of TextWrangler. Once we save a text file with a ".py" extension, TextWrangler will know our document is a Python program. It will use syntax colouring to help identify various syntax such as recognized operations will be blue and string literals will be red. Don't worry if this does not make sense now, rest assured it will soon enough :)

There is an excellent short screen cast that covers downloading and installing TextWrangler for Apple computers at: @http://www.youtube.com/watch?v=et2vjUAz9-k

The video will inform you to download TextWrangler from: @http://www.barebones.com/products/TextWrangler/download.html

Once installed, there is one small configuration change that is needed before we begin. Under Preferences, select "Editor Defaults". Please ensure the configuration matches the screenshot below. You should only need to check "Auto-expand tabs" and this will prevent us from experiencing unnecessary "indent errors".



Now that our environment is ready, it is time to look into the Python Commands.

__**Back to Learning Python**__