Message83445
When the HOME path is just '/' python says that the home path is ""
(zero length string)
I was able to reproduce this issue in 2.5.2 and 2.6 (no idea about 3.0)
Here's an example:
$ HOME=/ python -c 'import os;print os.path.expanduser("~")'
$ HOME=/tmp python -c 'import os;print os.path.expanduser("~")'
/tmp
$ HOME=a python -c 'import os;print os.path.expanduser("~")'
a
------8<----------
I just used "if !os.path.isdir(os.path.expanduser('~')):" check in
my application to avoid messing around the resulting paths when the
application runs.
The correct response should be '/' instead of ''. |
|
Date |
User |
Action |
Args |
2009-03-10 19:16:15 | pancake | set | recipients:
+ pancake |
2009-03-10 19:16:15 | pancake | set | messageid: <1236712575.55.0.379860744016.issue5471@psf.upfronthosting.co.za> |
2009-03-10 19:16:13 | pancake | link | issue5471 messages |
2009-03-10 19:16:12 | pancake | create | |
|