Skip to content
This repository

HOMESHARE not a good choice for "writable homedir" on Windows #747

Closed
bergtholdt opened this Issue August 30, 2011 · 1 comment

2 participants

Martin Bergtholdt Min RK
Martin Bergtholdt

in IPython/utils/path.py(234), the homedir is set by default to:

        homedir = env['HOMESHARE']

However as a user I cannot change HOMESHARE environment variable (it is reset after next login) and it is on our installation a path to a network drive that I cannot write to. I'd rather have this configurable or as first choice use HOME or IPYTHON_HOME or something else which I can make persistent as a user environment variable and only fall back to HOMESHARE which might work for other users.

Min RK
Owner

master should check whether the dir is writable, and skip it if not. But if it doesn't make sense for it to be the default, perhaps it should drop behind HOME. I don't know much about Windows environments, but a quick skim of The Googles seems to suggest that HOMESHARE isn't ever right, and it should be %HOMESHARE%%HOMEPATH%, if we are using it.

If you want to set the IPython directory, you can always use the IPYTHON_DIR env variable.

Min RK minrk closed this in 351c8fc November 23, 2011
Stefan van der Walt stefanv referenced this issue from a commit in stefanv/ipython November 13, 2011
Min RK defer to stdlib for path.get_home_dir()
We have elaborate and fragile logic for determining
home dir, and it is ultimately less reliable than the stdlib behavior
used for `os.path.expanduser('~')`.  This commit defers to that in
all cases other than a bundled Python in py2exe/py2app environments.

The one case where the default guess will *not* be correct, based on
inline comments, is on WinHPC, where all paths must be UNC (`\\foo`), and
thus HOMESHARE is the logical first choice.  However, HOMESHARE is
the wrong answer in approximately all other cases where it is defined,
and the fix for WinHPC users is the trivial `HOME=%HOMESHARE%`.

This removes the various tests of our Windows path resolution logic,
which are no longer relevant. Further, $HOME is used by the stdlib
as first priority on *all* platforms, so tests for this behavior are
no longer posix-specific.

closes gh-970
closes gh-747
b5ca646
Brian E. Granger ellisonbg referenced this issue from a commit January 10, 2012
Commit has since been removed from the repository and is no longer available.
Brian E. Granger ellisonbg referenced this issue from a commit January 10, 2012
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.