More elegant way to cwd?
M.E.Farmer
mefjr75 at hotmail.com
Mon Dec 27 19:10:01 EST 2004
Peter Hansen wrote:
[snip]
> Other than using os.pardir instead of '..', and possibly adding
> an "os.path.abspath()" call to the last bit (or does realpath
> already do that? It's unclear from the docs)
[snip]
I believe os.path.abspath and os.path.realpath are the same.
realpath is just an alias for abspath.
Using pydoc on os gives this:
py>realpath = abspath(path)
py> Return the absolute version of a path
M.E.Farmer
More information about the Python-list
mailing list