Message94217
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. |
|
Date |
User |
Action |
Args |
2009-10-18 17:42:09 | ezio.melotti | set | recipients:
+ ezio.melotti, ronaldoussoren, wrstlprmpft, strank, markon |
2009-10-18 17:42:08 | ezio.melotti | set | messageid: <1255887728.64.0.222566181506.issue1646838@psf.upfronthosting.co.za> |
2009-10-18 17:42:07 | ezio.melotti | link | issue1646838 messages |
2009-10-18 17:42:06 | ezio.melotti | create | |
|