About Python

In this course we will be working extensively with the Python computer language.

Python is a general-purpose high-level interpreted language that is rapidly growing in popularity in the geosciences. Benefits of Python include:
  • It’s easy to learn.
  • The code tends to be simple and easy to read.
  • It can run on just about any computer, maybe even your smartphone.
  • You can run your code interactively, so it’s great for exploring and learning about your data.
  • No compiling, no worrying about memory and data types
  • Powerful and well-supported packages for numerics, graphics, and scientific computing.
  • Object-oriented language design and careful namespace control make it easy to write reusable, multi-purpose code. (Don’t worry if you don’t know what this means right now).
  • It’s completely free and open-source.


For this class, you will need to install a scientific Python distribution on your laptop. Here “scientific Python” basically means Python itself plus all the libraries and packages we will need for numerics, data analysis and graphics.
By far the easiest way to get everything you need is to install one of these software packages:
- Canopy  (https://www.enthought.com/products/canopy/)
- Anaconda  (
https://store.continuum.io/cshop/anaconda/)

Both are complete scientific python distributions with everything you will need (aside from some custom packages that I will distribute later). Both are easy to install on Mac, Windows and Linux. Both have a package manager that makes it very easy to keep your installation up to date with the latest versions. Both come with an integrated editor / interactive console (much like Matlab).

Differences:
  • Canopy requires you to register for a free educational license to use the full set of scientific packages. It has a point-and-click graphical interface for the package manager.
  • Anaconda is totally free, no registration required. The package manager is a bit more primitive, requires you to use the command line.
  • The editors / consoles have a slightly different look and feel.

The underlying Python packages are exactly the same, so it really doesn't matter. You can always install both and see which you prefer.
For detailed instructions on registering and installing Canopy, go here
(the instructions are a bit out of date: Canopy now also works on Windows 8)
 
http://www.atmos.albany.edu/facstaff/brose/classes/ENV480_Spring2014/styled/styled-2/index.html

Note:
I happen to think that learning any kind of programming is best done by trial and error, and I will structure the assignments accordingly.
The advice on
this page sums up my feelings quite well: “The Hard Way is Easier”