I feel stupid -- determine the full path to a file
Jonathan Ellis
jonathan at utahpython.org
Thu Dec 6 11:01:59 MST 2007
On 12/6/07, Michael L Torrie <torriem at chem.byu.edu> wrote:
> If the script was invoked like this,
>
> foo ../bar
>
> then I need foo to be able to get a path that's the real, reduced path,
> without any dots in it. In other words, `pwd`/../bar is not going to
> work.
>
> Any tips?
Write the script in python and use os.path.abspath :)
-Jonathan
More information about the PLUG
mailing list