[Pythonmac-SIG] Running Python scripts without full paths

Nicholas Riley njriley@uiuc.edu
Sat, 30 Nov 2002 15:08:10 -0600


On Sat, Nov 30, 2002 at 12:43:47PM -0800, Paul Berkowitz wrote:
> > Something else might be overwriting your path.  Remember that you're
> > using tcsh whose parent is login whose parent is Terminal whose parent
> > is the WindowServer.  Check the initial environment of Terminal using
> > 'ps -eww'.  If that contains your PATH as you've set it, then follow
> > the chain of initial environments until you find the one that doesn't
> > contain your set PATH.
> 
> After logging out and in again, it _is_ now included in 'ps-eww' but not in
> 'printenv PATH'. What's the nest step(s) to check?
> 
> [250-166:~] berkowit% ps -eww
>   PID  TT  STAT      TIME COMMAND
>   721 std  S      0:00.20 -tcsh HOME=/Users/berkowit SHELL=/bin/tcsh
> USER=berkowit 
> PATH=~/bin/powerpc-apple-darwin:/Users/berkowit/bin:/usr/local/bin:/usr/bin:
> /bin:/usr/local/sbin:/usr/sbin:/sbin:/Users/berkowit/Library/Scripts/Python
> PYTHONPATH=/Users/berkowit/Library/Scripts/Python DISPLAY=:0.0
> __CF_USER_TEXT_ENCODING=0x1F5:0:0 TERM=vt100 TERMCAP=M-??M-W`
> TERM_PROGRAM=Apple_Terminal TERM_PROGRAM_VERSION=81 LOGNAME=berkowit
> (tcsh)
>
> Where should I check for what's overwriting the .plist?

Great!  So tcsh is changing your path, probably because of something
in one of the startup files.  Try setting the "execute this command"
box in Terminal's Preferences temporarily to '/bin/tcsh -V' and see
what it prints - somewhere in there will be a path change, I hope.
It'll be in one of tcsh's startup files - check the tcsh man page for
a list.

> OK, I did it that way this time. Thank you. pretty neat, once I figured out
> to click "New Sibling". (!) - not entirely obvious.

Yeah, long since past are the times when even Apple's developer tools
were easy to use.

-- 
=Nicholas Riley <njriley@uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>
        Pablo Research Group, Department of Computer Science and
  Medical Scholars Program, University of Illinois at Urbana-Champaign