[Pythonmac-SIG] Running Python scripts without full paths

Nicholas Riley njriley@uiuc.edu
Sat, 30 Nov 2002 13:45:32 -0600


On Sat, Nov 30, 2002 at 11:42:00AM -0800, Paul Berkowitz wrote:
> On 11/30/02 11:33 AM, "Nicholas Riley" <njriley@uiuc.edu> wrote:
> 
> > Most of Terminal's environment is what is in ~/.MacOSX/environment.plist.
> > That file is only read on login, which is a real pain, but until
> > there's some way to force WindowServer to reread it, you're stuck with
> > trial and error.  A temporary workaround is to run the app you want
> > directly from the shell instead of using LaunchServices to do it (as
> > with the 'open' command, the Finder, etc.)  The 'pythonw' script does
> > exactly this.
> 
> Thanks again, Nicholas. So can/should I add a new PATH key to my
> ~/.MacOSX/environment.plist, to get all future tcsh shell Terminal windows
> to inherit my scripts folder, as PYTHONPATH now does in the interactive
> interpreter? Will that work? (I understand that I'll need to log out and in,
> as OS X user, before it takes effect. I can put up with that for now.)

Yes, that's one way to do it.  If you just want stuff launched from
tcsh to be affected, then use ~/.tcshrc instead.

-- 
=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