def get_homedir():
    """return home directory, or best approximation
    On Windows, this returns the Roaming Profile APPDATA
    (use CSIDL_LOCAL_APPDATA for Local Profile)
    """
    homedir = '.'
    if os.name == 'nt':
        # For Windows, ask for parent of Roaming 'Application Data' directory
        try:
            from win32com.shell import shellcon, shell
            homedir = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0)
        except __HOLE__: # if win32com is not found
            homedir = os.get_environ('HOME', '.')
    else:
        try:
            os.path.expanduser("~")
        except:
            pass
    return homedir
dataset/ETHPy150Open xraypy/xraylarch/plugins/io/fileutils.py/get_homedir