Apple has provided two very simple ways to change the default python on OS X 10.6 Snow Leopard and 10.7 Lion. It's all detailed in the Apple man page for python(1):
$ man python
$ which python
/usr/bin/python
$ python -V
Python 2.7.1
#
# temporarily change version
#
$ export VERSIONER_PYTHON_VERSION=2.6
$ python -V
Python 2.6.6
$ unset VERSIONER_PYTHON_VERSION
$ python -V
Python 2.7.1
#
# persistently change version
#
$ defaults write com.apple.versioner.python Version 2.6
$ python -V
Python 2.6.6
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…