How to get full path to script?
socyl at 987jk.com.invalid
Mon Jun 9 18:07:50 CEST 2008
In <mailman.228.1213022580.1044.python-list at python.org> "Mike Driscoll" <kyosohma at gmail.com> writes:
>For my compiled scripts, I usually use this variation:
>path = os.path.abspath(os.path.join(os.path.dirname(sys.argv)))
Thanks. But why the os.path.join()? (BTW, I did read the docs
before posting, but they make no sense to me; they say that
os.path.join joins "one or more path components intelligently",
but what does it mean to join *one* component?)
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
More information about the Python-list