Get Path of current Script

Grant Edwards invalid at invalid.invalid
Mon Mar 14 10:54:05 EDT 2011


On 2011-03-14, Alexander Schatten <aschatt at gmail.com> wrote:

> Thanks for the comments so far. This sounds to be more complicated in
> detail than I expected. I wonder how all the other Python programs and
> scripts are doing that...

The usual answer is "they don't".

At least in the Unix world, finding out the path to the running
program is almost always the wrong way to solve the problem.  However,
since we don't know the problem that's being solved, it's hard to
suggest the "right" way to solve it.

-- 
Grant Edwards               grant.b.edwards        Yow! ... My pants just went
                                  at               on a wild rampage through a
                              gmail.com            Long Island Bowling Alley!!



More information about the Python-list mailing list