Thanks,
Tom
So my Py3 executable is at:
/Library/Frameworks/Python.framework/Versions/3.1/bin/python3.1
then symlink to that in folder:
/usr/local/bin
using command:
sudo ln -s /Library/Frameworks/Python.framework/Versions/3.1/bin/
python3.1 /usr/local/bin/python3.1
so that saying:
ls /usr/local/bin
shows the link to the Py3 folder as:
python3.1 -> /Library/Frameworks/Python.framework/Versions/3.1/bin/
python3.1
Now your existing scripts still work on Py 2.6. New scripts invoke Py3
like this:
#!/usr/local/bin/python3.1
For Terminal sessions, an alias in your bash_profile puts you in Py3
by default without nasty surprises:
alias python=/usr/local/bin/python3.1
You can also create a file at:
/Library/Python/3.1/site-packages/sitecustomize.py
with a configuration that runs at loadtime, although some things seem
to fail. But all in all this system has worked well for me (including
CGI) and should be easy to go mainstream once Apple goes to Py3.
-- Gnarlie
Unfortunately, there hasn't been a release of Python 3.1 since 3.1.1.
On the other hand, the problem isn't critical: it only prevents the
installation from creating the .pyc compiled byte-code files for the
python files in the standard library. Python 3.1.1 should run just
fine, albeit sometimes a bit slower, without them.
--
Ned Deily,
n...@acm.org