[Pythonmac-SIG] Re: Running Python scripts without full paths

Daniel Lord dmlsj@yahoo.com
Sat, 30 Nov 2002 12:19:35 -0800


On Saturday, Nov 30, 2002, at 11:48 US/Pacific, kevin parks wrote:

> I think that i got it to work.
>
> Apparently you can *NOT* set your path in 
> ~/Library/init/tcsh/environment.mine.
>
>

Au contraire, one can with this trick--put the following lines in 
~/.tcshrc:

# 
-----------------------------------------------------------------------
# Personal Environment
# 
-----------------------------------------------------------------------
source ~/Library/init/tcsh/path
source ~/Library/init/tcsh/rc.mine
source ~/Library/init/tcsh/environment.mine

It works for me and I don't have to logout to get the OSX plist to be 
re-read. Nota bene: a tech note I saw stated that the plist is what 
official applications read and they ignore the unix environment. So I 
put important environment variables for them in there as well. But 
Java, Python, Perl, bash, tcsh, fink, ant, etc.--all read the shell 
variables so those files work. I use them to set ANT_HOME, JAVA_HOME, 
CLASSPATH, aliases, etc., etc.

If you want to understand the reasoning and structure of the init 
files, check out "/usr/share/tcsh/examples/README" on your system. 
There are examples in there as well.

Prior to 10.2 Apple called the ~/Library/init files, but in 10.2 they 
stopped so you have to call them yourself. I suspect they were worried 
about conflicts between the init files snd the plist, but through 
perhaps dumb luck, I have not encountered any so far.

Daniel Lord

--
daniellordATtelocityDOTcom                                             
"My  dancing, drinking, and singing weave me the mat
GPG Fingerprint: C59E 59F5 1C63 5CFB 6161  067E FF00 A4E8 684A 16BB    
upon which my soul will sleep in the world of spirits"
                                                                         
                   -- Old Man of Halmahera, Indonesia