It’s easy:
defaults write com.apple.versioner.python Version 2.6
See man python
for a complete explanation from Apple.
Also, one gotcha: make sure you are running the Python that came with your computer and not some other one that you installed. Do this by typing which python
at your command prompt. It should point to /usr/bin/python
. I only mention this because my default is 2.6 under Snow Leopard (it was 2.5 when I was using Leopard). So the fact that you are getting 2.5 may indicate that there’s something else in your path.
Update
To address comments below:
This doesn’t do what people are asking.
It does for me, in OS X 10.8.2. After doing defaults write com.apple.versioner.python Version 2.6
, the default version of Python is indeed 2.6. (And likewise after changing back to 2.7.)
This is true whether I run python
directly, or use an executable script starting with #!/usr/bin/env python
—I get the expected version of Python.
This does not solve the symlink in /System/Library/Frameworks/Python.framework/Versions where Current point to 2.7 which may cause problems (because it is still in the sys.path with 2.6 !)
Indeed, it doesn’t fix that symlink.
However, run a short script that print()
s the sys.path
and (at least on my relatively default setup) the 2.6 library directories are on the path and the 2.7 dirs are not on the path. Nor is the Current
symlinked directory on the path. So it should not be a problem for most scripts.
However, it’s possible—haven’t tested—that the Current
symlink is used by either easy_install
or pip
. That would cause problems. It sure does seem like a bug that the symlink isn’t updated when you update the Python version.
Apple menu->System Preferences...->Accounts->Your Account->Login Items
Click '+' icon at the bottom to add "synergys".
OR
Use terminal and edit or create the /etc/rc file (which is what the GUI based instructions above do.)
You should be able to just place the path to synergys and it, save, and should execute on next startup.
UPDATE
based on comment
defaults write com.apple.finder
AppleShowAllFiles TRUE/FALSE
killall Finder (restarts finder after previous command is executed)
Best Answer
You want to use the program
dscl
to manage users on Mac OS X. Mac OS X uses it's own directory for users and groups and so the utilities to manage users and groups are exclusive to Mac OS X.The removal of a user takes several steps:
rm
can remove their user folder by default found in/Users/
The University of Utah Mac Managers group submitted an excellent script to CodeSnippets that does all the checks and work you're looking for.