Python.org OS X Python installers include an application called "Python Launcher.app" that does exactly what you want. It is installed in / Applications / Python nn / for nn> 2.6 or / Applications / MacPython nn / for 2.5 and earlier. In the preferences pane, you can specify which Python executable should run; it can be any command line path, including installed by Apple, on / usr / bin / python 2.5. You also need to make sure that .py is associated with the "Python Launcher"; you can use the Finder Get Info command to do this, as described elsewhere. However, keep in mind that this can be a security risk if downloaded .py scripts run automatically in your browser. (Note that Apple-supplied Python in 10.5 does not include "Python Launcher.app").
source share