David Abel


0. Instructions

1. Basics

2. Functions

3. Dictionaries

4. OOP

5. Modules

6. Debugging

7. Tips & Tricks

Python Tutorial

python logo

This tutorial is intended as an introduction to Python for folks with some prior programming experience.

Section 0: Instructions

First, you can download the zip file of all stencil code here.

Install python here (this tutorial assumes version 2.7.*).

For the duration of the tutorial, code blocks preceeded by three carrots indicate that we're working directly in the python interpreter, where lines without carrots indicate the output, e.g.:

>>> print "Hello"

Whereas a code block without these carrots indicate that we're working in a file, e.g.:

print "Hello"

Which we can then run by telling the python interpreter to interpret the file from a *nix shell (or cygwin on windows):

(dir/of/file) python name_of_file.py

Next Section >