Ezio Melotti <ezio.melo...@gmail.com> added the comment:

realpath is only supposed to return an absolute pathname, resolving '.',
'..' and symlinks. It's not its duty to expand '~', therefore in your
example

> In [3]: path.realpath('~')
> Out[3]: 'C:\\Dokumente und Einstellungen\\wrstl\\~'

the '~' is seen as a normal file and the cwd is used to create the
absolute path to it (on Windows realpath is the same as abspath, on
Linux realpath calls abspath when there's nothing to resolve, so the
result is the same -- i.e. cwd + filename).


realpath needs better tests and documentation though, but this can be
addressed in #6975, so I'm closing this.

----------
assignee:  -> ezio.melotti
resolution:  -> works for me
stage: test needed -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1646838>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to