NEWBIE: for statement in "dive into python" gives syntax error.

Andrae Muys amuys at shortech.com.au
Tue Jul 23 22:23:39 EDT 2002


Mack <gugabbe at hotmail.com> wrote in message news:<ahkla6$2n6$1 at green.tninet.se>...
> In <m2lm82tco9.fsf at mother.paradise.lost>, John Hunter wrote:

> python, python1.5 and python2. python were identical to python 1.5 so I
> just did a cp /usr/bin/python2 /usr/bin/python. I can always revert if
> somethings wrong.

I strongly suggest you use a symbolic link instead of a copy.  You may
very well forget that you have made this change, or if you get someone
to help you with an admin-problem they will not realise (without
signifigant pain) that you have switched default python versions.  A
symbolic link makes this change explicit, and documents it in the
filesystem.

To make the change do the following as root:

cd /usr/bin
rm /usr/bin/python
ln -s python2 python

Naturally as a complete stranger is recommending you execute certain
commands as root, sanity check them yourself first---or if you don't
feel confidant doing that, get someone else with more Linux/Unix
experience to do it first.

Andrae Muys



More information about the Python-list mailing list