Message83445
| Author |
pancake |
| Recipients |
pancake |
| Date |
2009年03月10日.19:16:12 |
| SpamBayes Score |
2.647558e-09 |
| Marked as misclassified |
No |
| Message-id |
<1236712575.55.0.379860744016.issue5471@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 ''. |
|
History
|
|---|
| 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 |
|