Permission Denied

Jorgen Grahn grahn+nntp at snipabacken.dyndns.org
Sun Aug 20 18:01:32 EDT 2006


On Sun, 20 Aug 2006 10:35:31 -0300, Jorge Godoy <jgodoy at gmail.com> wrote:
> Stargaming <stargaming at gmail.com> writes:
>
>> In the most cases, PATH is preconfigured to include "." (. is the current
>> directory as .. is the parent one).
>
> I most cases on Unix boxes it isn't configured to include ".".

Indeed -- but "Stargaming" might have missed a negation somewhere, because
he went on to say

[rearranged from the above]
>> You can use ./yourpythonscript in this
>> case.

which is precisely what you /don't/ need to type if you have placed . in
your $PATH.

> The solution of creating a directory and adding it to PATH is the best one,
> IMHO.  Having a "~/bin" is also common for Linux and some distributions of it
> already ship with it in /etc/skel and in the PATH, so just put a link there or
> copy your scripts there. 
>
>> The most "advanced" way would be expanding PATH with
>> /home/youraccount/python/learning (use PATH=$PATH:/path/here..).
>
> Yes.  This is the best.

I wouldn't want random scripts under development ending up in my $PATH, not
even my own.

When you're just playing with/developing scripts, it's better to execute
them by path (./foo.py etc). When you think they work and you have a
long-term use for them, you install them globally, or copy, move or link
them into your ~/bin/.

/Jorgen

-- 
  // Jorgen Grahn <grahn@        Ph'nglui mglw'nafh Cthulhu
\X/     snipabacken.dyndns.org>  R'lyeh wgah'nagl fhtagn!



More information about the Python-list mailing list