os.path.realpath() and os.path.abspath()
os.path.realpath() documentation states that it returns a 'canonical'
path. Does that infer that it returns an absolute path?
I have not found seen any implementation that does not return an
absolute path, but can this be counted on? Or should we use
os.path.abspath(os.path.realpath(x)) when we want to convert x to its
Re: os.path.realpath() and os.path.abspath()
On Jan 11, 6:35*am, Jurko GospodnetiŠ <jurko.gospodne...@pke.hr>
> * *Hi all.
> * *os.path.realpath() documentation states that it returns a 'canonical'
> path. Does that infer that it returns an absolute path?
A canonical path is supposed to be absolute and at least Python 2.7.1
ensures that is the case.
Historically, some versions of the UNIX syscall (Solaris in
particular) have not always returned absolute paths, but I believe
this is no longer the case and was a very long standing bug (though I
may be mistaken).
|All times are GMT. The time now is 06:19 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.