[Pythonmac-SIG] Running Python scripts without full paths

Paul Berkowitz berkowit@silcom.com
Sat, 30 Nov 2002 16:16:48 -0800


On 11/30/02 3:06 PM, "Jack Jansen" <Jack.Jansen@oratrix.com> wrote:

> And then Apple appeared on the Unix front and made things even more
> difficult because they didn't want to mimic their
> window-system-initialization on X11, probably because they didn't want
> to depend on /bin/sh or /bin/csh in the login sequence, and they
> invented environment.plist.
> 
> And, of course, this is only the part of the story that I understand:-)

Thank you, Jack.

What appears to be happening in OS 10.2 is that tcsh's defaults override
environment.plist for PATH settings, unless you override those in turn with
a path customization in ~/Library/init/tcsh. It seems, according to
Nicholas, that this does not happen in zsh. I will, in due course, discover
what happens in bash since AppleScript's 'do shell script' command uses bash
in 10.2 (in 10.1 it was zsh).

Now that I have appended my scripts folder to my PATH in
~/Library/init/tcsh/path, I now see this in Terminal using /bin/tcsh -X -Y
for new Terminal windows:

set default_tcsh_initdir = /usr/share/tcsh/examples/
set default_tcsh_initdir = /usr/share/tcsh/examples/
set user_tcsh_initdir = ~/Library/init/tcsh
set user_tcsh_initdir = ~/Library/init/tcsh

if ( -r "${user_tcsh_initdir}" ) then
if ( -r /Users/berkowit/Library/init/tcsh ) then
set tcsh_initdir = "${user_tcsh_initdir}"
set tcsh_initdir = /Users/berkowit/Library/init/tcsh


whereas, earlier (before creating the path file), using /bin/tcsh -X ;


if ( -r "${default_tcsh_initdir}/tcsh.defaults" ) then
source "${default_tcsh_initdir}/tcsh.defaults"



So it seems that the tcsh defaults override environment.plist for PATH (not
PYTHONPATH), unless you set your own customizations.

It all seems a bit inconsistent: why provide an environment.plist option
that's not followed by certain shells? And why not create the
environment.plist  by default in the first place, I wonder?


-- 
Paul Berkowitz