[Pythonmac-SIG] ok, i am stumped!

Lee Phillips lee@lee-phillips.org
Sat, 5 Oct 2002 22:13:51 -0400


> [snowcat:~] kevin% ./foo.py 
> hello kevin
> [snowcat:~] kevin%  foo.py
> foo.py: Command not found.
> [snowcat:~] kevin% 
> 
> 
> Have i forgotten that much UNIX?

Yes. If you want the "current directory" to be in your path, you need to add
"." to the path. Note that some people consider this a security risk, and
there are attacks based on exploiting people having "." as part of their
paths. So, either put all your scripts somewhere such as /usr/local/bin
(making sure that's in your path) or set up a special directory such as
~kevin/bin, put that in your path, and put all your scripts there.

Also, I thinks it's better to make your own shell startup script, which you
put in ~kevin, rather than mess with the system-wide script. Look at
man tcsh for a description of how and when the startup scripts are read.
While you're at it, install bash and use that instead.