[Pythonmac-SIG] setting tcsh path in OS X.bloat
Chris Barker
chrishbarker@home.net
Mon, 09 Jul 2001 10:18:20 -0700
parks kevin wrote:
> I am sorry if this is too off topic, if so i apologize.
I'll keep it going anyway... someone yell if you want us to stop. I've
only played a littel with OS X, but as a long time Linux user I may be
able to help out some here.
>I find the tcsh configuration on Mac OS X to be very very confusing.
YOW! what a nighmare, but it looks to me like the real problem is
documentation, not the wet-up, it looks like it's actually a pretty
nifty set up, as long as you know where you need to go to change things.
> how to _*ADD*_ to my path and not just clobber it.
usually this is done with a line like:
set PATH=$PATH:/new/dir/here
or
set PATH=/new/dir/here:$PATH
the $PATH gives you the existing path, and you can then just add on.
> I want (like freaking crazy) to be able execute scripts in various dirs without having to type the whole path. I want to say:
>
> kevin% hello.py
>
> and not
>
> kevin% ~/freakinpath/reallylongpath/killmepleasepath/godimissmyNeXT/hello.py
>
> But to do this i need to edit (or really append or extend) my path, how on god's green earth do you do this in OS X.bloat?
You should be careful about this anyway. I don't know if you are an old
DOS/Windows user, but the practice of putting executables anywhere you
want, and then adding the dir to the PATH results in a mess, and is not
the Unix way. In Unix, there are a small set of places that stuff you
want to run are put. On lInux, anyway, these are:
\bin : core system programs
\sbin : system adminstation programs, usually not on a normal users
PATH
\usr\bin : most programs installed by the native system installer
\usr\local\bin: programs installed by the user
There may be a few others, like /usr/X11R6/bin for X-windows stuff. I
don't know what the OS X standards are, but it is a really good idea to
stick to them, whatever they are. Any program you write yourself (or
just install yourself) should go into /usr/local/bin. You don't need to
put the whole program there. If it is a liitle program or simple script,
I usually just put it there. If it is a more comlicated set-up, you can
put the rest of it in its own directory: /usr/local/myprogram, and then
put a symbolic link into /usr/local/bin. The other option is to put the
various parts of your program into the classic places: /usr/local/lib,
/usr/local/share, etc. (Python is put into /usr/local/lib/python2.1 on
my system). Personally, I think that's ugly: why should Python be in
lib? The Python headers go into /usr/local/include, which makes some
sense at least.
On the old Mac, there is no path, as there is no command line. There is
no standard place for anything outside the system folder, so people end
up putting aliases to programs on their desktop (or in the launcher) so
that you don't have to go hunt all over the sytem to find a program and
start it. This is analogous to putting a symbolic link in
/usr/local/bin.
Some people do want their current working directory to be in the PATH
(as that is how this thread started) this was always the case on DOS,
but is not with Unix. You can add it to your path:
set PATH = ./:$PATH
This is considered dangerous in the Unix community in general. I'm not
sure why, but I stick with the standard just type the ./ when I want to
run a script in my current directory.
> "i miss windowshading like crazy-ily yours"
Does OS X not windowshade? This just confirms my feeling that OS X is
just a poor imitation of Linux with KDE, and some extra eye candy.
Good luck, and welcome to Unix!
-Chris
--
Christopher Barker,
Ph.D.
ChrisHBarker@home.net --- --- ---
http://members.home.net/barkerlohmann ---@@ -----@@ -----@@
------@@@ ------@@@ ------@@@
Oil Spill Modeling ------ @ ------ @ ------ @
Water Resources Engineering ------- --------- --------
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------