google-code-export / winpython

Automatically exported from code.google.com/p/winpython
2 stars 1 forks source link

os.path.expanduser('~') returns directory of WinPython instead of user home directory #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Execute in a Spyder console:

import os
os.path.expanduser('~')

What is the expected output? What do you see instead?
Expected (on Windows): 'C:\Users\Login'
Instead seen: 'C:\\DEV\\WinPython-64bit-2.7.3.2\\settings'

What version of the product are you using? On what operating system?
-see path above

Please provide any additional information below.
from PyQt4.QtCore import QDir
QDir.homePath()

works correctly.

Original issue reported on code.google.com by fzumst...@gmail.com on 14 Mar 2013 at 7:45

GoogleCodeExporter commented 9 years ago
Actually this is the intended behavior: the %HOME% environment variable is 
redirected towards the local "settings" directory. This is the expected 
behavior for a portable application.

However, I have plans to make this redirection optional.
See my comments in Roadmap (https://code.google.com/p/winpython/wiki/Roadmap) 
and Issue 19.

Original comment by pierre.raybaut on 15 Mar 2013 at 9:01