Message226085
(When responding via email, please delete the quoted test (except possibly for a line or two) as it constitutes noise when viewing the web page.)
On my updated win7, I get with 3.4.1
>>> import os.path
>>> userDir = os.path.expanduser('~')
>>> userDir
'C:\\Users\\Terry'
Contrary to the doc, I do not have HOME, but do have HOMEDRIVE and HOMEPATH, so expanduser must be using those.
configHander now uses os.getcwd() as a backup, but a comment wonders if this is adequate. (On windows not at present, as cwd is the specific version Python directory.)
I do not understand your comment about %userprofile% or
userDir = os.path.expandvars(os.path.expanduser('~'))
If expanduser('~') returns '~', expandvars('~') does too.
Please explain with quoted code and the result of running it. |
|
Date |
User |
Action |
Args |
2014-08-29 21:10:15 | terry.reedy | set | recipients:
+ terry.reedy, weizhao |
2014-08-29 21:10:15 | terry.reedy | set | messageid: <1409346615.6.0.912950115146.issue19062@psf.upfronthosting.co.za> |
2014-08-29 21:10:15 | terry.reedy | link | issue19062 messages |
2014-08-29 21:10:15 | terry.reedy | create | |
|