After going through the process of teaching myself python and watching others stumble through the process, it seemed prudent to assemble a set of resources that I used or wished I knew about as I learned.

Start with Python 2.7

Python 3.x may be the future, but Python 2.7 still has much more comprehensive library support.  Spend your time learning the Python rather than tackling problems with incompatible libraries and start with version 2.7.

Get a package manager

Particularly when you are starting with Python, you will frequently find yourself installing, uninstalling and searching for libraries.  By default Python comes with easy_install to help with installing new libraries, but it provides little to no support for finding new packages, or figuring out what you already have installed.

Pip is an excellent, cross-platform replacement that can be used to search for and install new libraries and to keep track of what you already have installed.

Find a good IDE

A good IDE will help smooth out some of the roadblocks you are sure to encounter while learning a new language.  Some of the key features you should look for in an IDE are:

  • A command line
  • A script editor
  • Integrated help
  • A workspace view

Together these features make it very easy to build a script incrementally, exploring and learning as you go without having to jump around between multiple tools.

So far, my favorite IDE for Python is IEP because it has all of the features noted above.

Go through a tutorial

It is always easier to learn a language if you can start with a grounding in the basic commands before tackling harder problems.  I neglected this step and it cost me a lot of time and energy.

Learn basic exploratory commands

There are three commands that are indispensable when learning python:

  • type()
  • dir()
  • help()

Between these functions, you can determine the type of an object, most of the methods you can use on the object and how to use those methods.  Of particular note is that you can pass object.<method> to help to get details for an individual method.

Remember that Python is supposed to be easy

Whenever you feel that a task is harder than it should be, you are probably right.  Take a step back and think about what you are trying to accomplish.  There probably is a method or library out there that will make your task easy.  Look at the documentation for the object(s) you are working with and/or search for a relevant library.  Even if you cannot find a method or library to solve the problem directly, someone on has probably asked a similar question and gotten a good answer for how to approach the problem.