Function for the path of the script?
rurpy at yahoo.com
rurpy at yahoo.com
Tue Oct 29 00:00:39 EDT 2013
On 10/28/2013 08:49 AM, Grant Edwards wrote:
> > On 2013-10-27, Chris Angelico <rosuav at gmail.com> wrote:
>> >> On Sun, Oct 27, 2013 at 1:52 PM, Gary Herron
>> >> It's very common to want to know what directory you're in - it's a
>> >> good way to find data files.
> >
> > From a Unix point of view, that's also very wrong. Data files don't
> > belong in the same directory as the executable.
In the case of applications installed in /opt, data files
quite often go in a subdirectory of the executable (or a
subdirectory of the executable's parent dir) and getting
the executable's dir is the first step to find the data
files.
This is not only *not wrong* but the FHS prohibits locating
such files outside of the /opt subdirectory tree, with some
minor exceptions.
This was pointed out before but since you said you ignore
posts from GG you probably missed it, and will probably miss
this one too, and thus continue to post bad information.
This is a small but illustrative example of why such broad-
brush filtering is a bad idea. But it is your choice.
More information about the Python-list
mailing list