Sunday, December 30, 2012

Getting Started with Python

I have embarked on a quest to learn Python. I actually want to learn the language for several reasons. Most of all, I just want to learn a new language that I don’t know anything about. Second, I have lots of colleagues promoting it, so it makes sense to learn something I know I can get help from people I work with and see often. Third, I believe that learning more languages will make me a better technologist and more objective towards programming in general.

If you are on the same train of thought, and you want to learn a new programming language to add it to your skills, Python could be a great choice. If you are up for it, I hope that you will find something useful here, or at least, a place to have a conversation on the subject.

According to the official documentation (lets get academic, shall we), Python is “an interpreted, interactive object-oriented programming language suitable (amongst other uses) for distributed application development, scripting, numeric computing and system testing”.

image

So, here we go. I’m using the Khan Academy’s Windows 8 application. It allows me to browse Computer Sciences courses (which are just a few at the moment and most of them using Python). Randomly choose a course video (lets starts with the basics first) and jump right in.

After watching a few videos, and once I felt ready to tackle some basic Python (for some reason I keep typing “Pythin” every time). Next step was to setup my Python coding environment on my Windows 8 PC.

image

image

image

The first thing (and I got this wrong the first time since I installed the IDE first, and of course, it didn’t work), you need to install Python itself. You can get the Windows installer here. I chose to install Python 3.3 since is the newest stable version available. There is also IronPython, which is Python running on .NET, but I’ll leave that for later.

image

Once Python is installed, you need your IDE. For now, I’m using PyScripter as my Python IDE.

image

Notice that you might get an error preventing you from running the IDE if you installed the x64 version. The error can occur also if you haven’t installed Python first. If that is the case, make sure you have installed Python. If the error still shows up, just try the x86 version of PyScripter and you should be good to go.

That’s it. You are really to start coding you first Python scripts and programs. I’ll keep posting about the subject and force myself to learn as quickly as possible. Here’s the official tutorial and a list of Python books to keep you busy.

image

Please feel free to leave your comments, suggestions, ideas or just to start a conversation. Always happy to exchange ideas with fellow technologists.

No comments:

Post a Comment