This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients terry.reedy, weizhao
Date 2014-08-29.21:10:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1409346615.6.0.912950115146.issue19062@psf.upfronthosting.co.za>
In-reply-to
Content
(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.
History
Date User Action Args
2014-08-29 21:10:15terry.reedysetrecipients: + terry.reedy, weizhao
2014-08-29 21:10:15terry.reedysetmessageid: <1409346615.6.0.912950115146.issue19062@psf.upfronthosting.co.za>
2014-08-29 21:10:15terry.reedylinkissue19062 messages
2014-08-29 21:10:15terry.reedycreate