Message61057
This might be intentional, but it is still confusing.
On Windows XP (german)::
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
...
In [1]: import os.path as path
In [2]: import os; os.environ['HOME']
Out[2]: 'D:\\HOME'
In [3]: path.realpath('~')
Out[3]: 'C:\\Dokumente und Einstellungen\\wrstl\\~'
In [4]: path.expanduser('~')
Out[4]: 'D:\\HOME'
The cause:
realpath uses path._getfullpathname which seems to do the '~' expansion, while path.expanduser has special code to look for HOME* environment variables.
I would expect that the HOME setting should always be honored if expansion is done.
cheers,
stefan
|
|
Date |
User |
Action |
Args |
2008-01-20 09:59:12 | admin | link | issue1646838 messages |
2008-01-20 09:59:12 | admin | create | |
|