◐ Shell
clean mode source ↗

Message 226085 - Python tracker

(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.