Terry J. Reedy added the comment:

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

----------
nosy: +terry.reedy
title: problems with pyshell to get userdir -> Idle: problem confighandler 
getting userdir
versions:  -Python 3.1, Python 3.2, Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19062>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to