Lesson 1: Setting up Your Environment

Intro to the class and Python

Introduction

Learning to program, whether in Python or in any other language, is about more than the fundamentals of the language. Learning to program also involves learning the tools involved. You might liken it to carpentry. Without an adequately provisioned workshop, and without tools appropriate for the job, a carpenter wouldn’t get very far.

Under ideal circumstances, learning to program also involves learning to collaborate with others on code development. Working with other programmers is one of the best ways to improve as a programmer. The tools involved in collaboration are also a part of a programmer’s workshop.

In this lesson we are looking to provision your workshop. We are going to set up an environment that will facilitate the collaborative creation of Python code. We are also going to introduce you to Python itself.

Learning Objectives

After completing this lesson, students will be able to:

  1. Install and use your own functional Python development environment appropriate for your operating system of choice

  1. Navigate the command line shell to set the working directory and run Python and git

1. Have a working installation of git 1. Create and run a simple Python script

Suggested Workflow

At the End of the Lesson

What material in this lesson do you still feel unclear about? Please use ??? to describe any concepts or ideas you’ve struggled with this week. Your instructor will address concepts that seem problematic for several students. You may also want to address issues raised by other students or ask for their help.

Pre-class Preparation

Get your Environment set up!

If you were able to attend the pre-class orientation, you should be all set. if not, then do this:

Install Python

Installing Python and core tools

Set Up a Great Dev Environment

Make sure you have the basics of command line usage down:

Work through the supplemental tutorials on setting up your Command Line (Shell Customizations for Python Development) for good development support.

Make sure you’ve got your editor set up productively – at the very very least, make sure it does Python indentation and syntax coloring well.

Setting up your Environment

Exercises:

Finish Setting up your dev environment

Make sure you know how to create a python file, save it, edit it, run it, etc.

Also make sure you are comfortable “playing” with python in the iPython command line.

If you are uncomfortable with the command line, brush up on that: This: is a good tutorial.