We'll be using Python in the workshop, and it'll save lots of time if, before arriving at the workshop, everyone has this installed and is familiar how to open, edit, and run a script (which is just a text file) using Python.
Furthermore, we'll be using IDLE, Python's own IDE (Integrated Development Environment) — combined source code editor and Python interpreter GUI. The workshop does not rely on any of its specific features, but it makes working with Python on Windows much easier and provides a multi-platform basis for examples.
No significant storage resources will be required, just a convenient place to browse, download files, create text files, etc.
C:\Documents and Settings\MY_USERNAME\My Documents\workshop (Windows), or
This is referred to generically as WORKSHOP below.
There's a new major release of Python out, version 3. We are not using this — we're using version 2.
Python and IDLE are not installed by default.
winmsd.exe(in Windows XP) or
msinfo32.exe(in Windows 7). Look at
Processor. It will look this this for 32-bit, or this for 64.
IDLE (Python GUI) and
Python (command line) should now by in your program menu, under
Python 2.7, and Python will be associated with
However they're going to need to know about the files we create during the workshop.
This is easiest if we start IDLE from the WORKSHOP folder itself.
Let's create a Windows script,
idle.bat that does that:
New -> Text Document, name it
idle.bat(accept the warning about file extensions).
You should now be able to double-click
idle.bat to open IDLE.
Python is installed by default, but IDLE is not (and Python is likely a little old). Follow these instructions for a Mac binary install, or install from source, using the instructions further down the page.
Terminal.app. At the time of writing, the choices are:
32-bit for Mac OS X 10.3 through 10.6: Python 2.7.3 Mac OS X 32-bit i386/PPC Installer
32-bit or 64-bit OS X 10.6: Python 2.7.3 Mac OS X 64-bit/32-bit x86-64/i386 Installer
We're going to want to launch IDLE from within the WORKSHOP directory.
This should work by default.
Terminal.app from the Applications menu, and type:
Where WORKSHOP is replaced by the directory you chose to use for the workshop. Now type:
and hit ENTER to launch IDLE.
Python is installed by default, but sometimes IDLE is not.
Either install IDLE using your distro's package manager, e.g.
apt-get install idle (Ubuntu/Debian/etc.),
yum install python26-tools (RHEL/CentOS/etc.),
USE=tk emerge -avn python (Gentoo), etc., or install new version of Python from source (which will include IDLE).
Launching IDLE from the WORKSHOP directory will be the same as for the Mac case above (just use your favorite terminal instead of
On Mac or Linux, you can instead compile Python from source. Instructions are here.
You should now have an IDLE session open that looks something like this:
This is where we'll pick up the workshop.
If you're feeling ambitious, try creating a Python script by clicking
File -> New Window, which will open a text editor window, and enter the following line:
File -> Save and enter
hw.py for the filename.
Run -> Run Module to run the script:
You have now written and run a Python script.