Re: [Pyobjc-dev] Detecting Python interpreters on startup
Brought to you by:
ronaldoussoren
From: Just v. R. <ju...@le...> - 2003-09-05 13:25:28
|
Dinu Gherman wrote: > I got the following request, which makes me wonder how the one Python > interpreter is located running PyObjC applications? > > > I was very impressed with the movie of reSTedit. As I use reST all > > the time, I down-loaded it, When I tried to run it on my Mac > > (10.2.6) by double-clickign the application, it started and then > > closed without any screen coming up. I normally run Python 2.3 via > > XDarwin (a Fink load) but I do have Python 2.2.1 in my > > Applications. > > In my bin-python-main.py (which might not be the newest one) I found > the following snippet: > > ## bin-python-main.py > > // figure out which python interpreter to use > NSString *pythonBinPath = [[NSUserDefaults standardUserDefaults] > stringForKey: @"PythonBinPath"]; > pythonBinPath = pythonBinPath ? pythonBinPath : @"/usr/bin/python"; > > Is this hardwiring /usr/bin/python as the one interpreter to use? Or > has this been determined at "project instantiation time" using the > Python-Cocoa Application template? > > What is the general policy in chosing between possibly many installed > Python interpreters and/or can this decission be delayed until the > launch time of an application and how? Apps built with bundlebuilder.py also hard-wire /usr/bin/python, but only as the #! line of the bootstrap script. If someone _deletes_ /usr/bin/python, he/she has a broken system. People should simply not touch /usr/bin, period. Just |