[Pythonmac-SIG] My stab at a new page

Nicholas Riley njriley at uiuc.edu
Mon Feb 13 20:13:04 CET 2006


On Mon, Feb 13, 2006 at 09:06:06AM -0800, Christopher Barker wrote:
> Bill Janssen wrote:
> > You missed the first part of my message, I think.  The system version
> > would be installed under /usr/libexec/, or some such place, not under
> > /usr/bin/.
> 
> That is a good idea, but how do we get Apple to do it?

So the end result is that the system Python (and Perl, Tcl, Ruby, ...)
isn't visible?  Yuck - as started earlier in this thread, there are
plenty of people for whom the system Python 2.3.x is plenty usable.
Not everyone creates bundled applications for redistribution, or needs
Python 2.4.

> Way back when Redhat used python1.5 with a bunch of added extensions for 
> its admen tools. All their tools had "usr/local/bin/env python" in the 
> #! line. This was a pain in the *&$^&%* when you wanted to upgrade your 
> standard python, just like it's a pin now with Apple.
> 
> However, all they needed to do was put a darn version on the #! line:
> 
> /usr/bin/env python1.5
> 
> Apple could do the same thing, then all their admin tools would be 
> insulated from adding additional, newer pythons anywhere on the PATH.

What Apple does now, i.e. #!/usr/bin/python (see the contents of
/usr/libexec/fax, for example), is better - what if you had a
replacement Python 2.3 which didn't have Apple's CoreGraphics bindings
in it, for example?  It's not always going to be the case that Apple
provides a Python version one major version behind the current one.
 
Also, a lot of Apple's tools run from within a GUI context where the
path is set by the loginwindow environment
(~/.MacOSX/environment.plist), not by your shell initialization files,
which makes absolute paths more attractive.

They could use #!/usr/bin/python2.3, I guess...

> NOTE: Even better would be a way to specify multiple versions in
> order of preference, and a python launcher that would sort that out
> for you.  This would be particularly nice on Windows, where you can
> only associate *.py with one thing. Maybe some day I'll want that
> enough to write it!

Apple does something similar with its Java launching mechanism; you
can specify "exactly this JVM version" or "this major version" or "at
least this version" and so forth in the Info.plist file.  It'd be nice
if Apple provided a standard way to handle versioning for any
system-provided interpreter, though whatever they did would only be
likely to apply to bundled applications, not command-line stuff.

-- 
Nicholas Riley <njriley at uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>


More information about the Pythonmac-SIG mailing list