We’re all very familiar with text, since we read and write it every day. Here we will treat
text as raw data for the programs we write, programs that manipulate and analyze it in
a variety of interesting ways. But before we can do this, we have to get started with the
Python interpreter.
Getting Started with Python
One of the friendly things about Python is that it allows you to type directly into the
interactive interpreter—the program that will be running your Python programs. You
can access the Python interpreter using a simple graphical interface called the In
teractive DeveLopment Environment (IDLE). On a Mac you can find this under Ap
plications→MacPython, and on Windows under All Programs→Python. Under Unix
you can run Python from the shell by typing idle (if this is not installed, try typing
python). The interpreter will print a blurb about your Python version; simply check that
you are running Python 2.4 or 2.5 (here it is 2.5.1):
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
