lab4 - Using Python in the Maclab To begin, let's make sure...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Using Python in the Maclab To begin, let's make sure you're using the (mostly) up to date version of Python, which is 2.5. To check this, type python at the command line. This opens the Python interpreter, which allows you to type Python expressions and see the result immediately. (For those of you familiar with DrScheme, it's much like the interactions window of that program.) When you run the interpreter, you should see something resembling the following: Python 2.4.4 (#2, Jan 13 2007, 17:50:26) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1 21)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> If the number following the word Python is 2.5, you don't need to do anything. Unfortunately, as you can see, the version of Python being used in the example output is 2.4.4 not the latest. To allow us to access the latest version by typing python2.5, however, we first need to tell the shell to look in the right place. We do this by changing the shell's PATH variable. PATH is a list of directories the shell looks in first for executable programs. python2.5 lives in the directory /usr/bin/python2.5. To add this to the PATH variable we type
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

lab4 - Using Python in the Maclab To begin, let's make sure...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online