def get_home_envvars(new_home):
    'Return dict with env variables to be adjusted for a new HOME\n\n    Only variables found in current os.environ are adjusted.\n\n    Parameters\n    ----------\n    new_home: str or Path\n      New home path, in native to OS "schema"\n    '
    new_home = str(new_home)
    out = {'HOME': new_home}
    if on_windows:
        out['USERPROFILE'] = new_home
        (out['HOMEDRIVE'], out['HOMEPATH']) = splitdrive(new_home)
    return {v: val for (v, val) in out.items() if (v in os.environ)}
Return dict with env variables to be adjusted for a new HOME

Only variables found in current os.environ are adjusted.

Parameters
----------
new_home: str or Path
  New home path, in native to OS "schema"
def get_home_envvars(new_home):
    'Return dict with env variables to be adjusted for a new HOME\n\n    Only variables found in current os.environ are adjusted.\n\n    Parameters\n    ----------\n    new_home: str or Path\n      New home path, in native to OS "schema"\n    '
    new_home = str(new_home)
    out = {'HOME': new_home}
    if on_windows:
        out['USERPROFILE'] = new_home
        (out['HOMEDRIVE'], out['HOMEPATH']) = splitdrive(new_home)
    return {v: val for (v, val) in out.items() if (v in os.environ)}