Boston Python Workshop/Friday handout

Welcome to Friday setup! Setup hours are from 5pm-8pm. Come any time within that block. Expect standard setup to take an hour, and the optional web app setup to take an additional hour.

The goals for this evening are to make sure you have a working environment for writing and running Python code and for writing ColorWall effects. There are also setup instructions and support for a second, optional project: a web app.

Site information

 * Friday setup and the Saturday workshop are both happening at Microsoft NERD, which is at One Memorial Drive in Cambridge, in the Thomas Paul room on the 1st floor.
 * To access the wireless network, connect to the Cambridge network and open a browser. You should be redirected to a login page, which will prompt you for a wireless code. The code is: pw304.

Setting up Python
This section has instructions for installing Python and running Python from a terminal prompt.


 * 1) Windows
 * 2) OS X
 * 3) Linux

In addition to being able to run Python, you should pick the text editor you'll use for writing and saving Python code during the workshop.


 * On Windows, you might use NotePad. To start NotePad: click Start, point to Programs, point to Accessories, and then click Notepad.
 * On OS X, you might use TextEdit. To start TextEdit: search for TextEdit from Spotlight, or navigate to Applications/TextEdit.
 * On Linux, you might use GEdit. To start GEdit: click Applications, point to Accessories, and click Text Editor.

How to get to a Python prompt
Often in these directions, you'll need to type things at Python prompt. To get one:


 * On Windows: Start -> Run -> cmd.exe
 * Type this, and press enter:
 * \python27\python
 * On Linux or Mac OS:
 * Open a Terminal, and type 'python'

Setting up the ColorWall
The ColorWall is a framework for writing effects for a wall of pixels. During the Saturday workshop, you will write your own effects for the ColorWall. (see it in action)

 Download the ColorWall project from http://mit.edu/jesstess/www/BostonPythonWorkshop.  Windows users, try http://mit.edu/jesstess/www/BostonPythonWorkshop/ColorWall.zip first, and download it to your Desktop. The file should automatically get uncompressed when you download it. OS X and Linux users can use either the .zip or .tar.gz file.   The ColorWall project has no dependencies to install on common, modern Windows, OS X, and Linux* distributions. To confirm that you have no dependencies to install, at a Python prompt run:

import Tkinter

If that command results in an, let a staff member know and we'll help get your dependencies set up. (*On some Debian installation, when you  it will tell you that you need to install the   package, which you should do). After you are done at the Python prompt, exit to the regular terminal by typing  and hitting enter. Run the example effects:  On Windows, assuming the ColorWall software was downloaded to, run   On OS X, assuming the ColorWall software was downloaded to, run  </li> On Linux, assuming the ColorWall software was downloaded to, run  </li> </ul> </li> Make sure you can open Python files in a text editor. Test this by running the text editor, navigating to your ColorWall directory, and opening .</li> </ol>

Setting up for the intro programming workshop
FIXME: Flesh this out

Checklist:


 * Get the ZIP or tar.gz file for the intro programming exercises
 * Get the data_types.txt
 * Can you open up Python code in a text editor?
 * Can you get to a Python prompt?

Setting up the web app
If you want to make a web app on Saturday, you have to go through this process. This is an optional step in setup; however, it can be an exciting and fulfilling one. The web app is an example of an integrated Python-based application. It uses the Django web framework. Because the setup for this project is somewhat involved, this project and its setup are optional. If you run into trouble, get the help of a staff member.

If you are interested in the material, please try:


 * Setting up the web app

That's it! Friday is over.
In summary, make sure you leave on Friday comfortable with the following things:


 * 1) Running Python from a command prompt
 * 2) Running the ColorWall from a command prompt
 * 3) Editing Python code in a text editor

Let us know if you have any questions about Friday's setup or Saturday's workshop, and we look forward to seeing you on Saturday!