def user_data_dir(appname, roaming=False):
 if WINDOWS:
  const = ((roaming and 'CSIDL_APPDATA') or 'CSIDL_LOCAL_APPDATA')
  path = os.path.join(os.path.normpath(_get_win_folder(const)), appname)
 elif (sys.platform == 'darwin'):
  path = os.path.join(expanduser('~/Library/Application Support/'), appname)
 else:
  path = os.path.join(os.getenv('XDG_DATA_HOME', expanduser('~/.local/share')), appname)
 return path

def user_data_dir ( appname , roaming = False ) : if WINDOWS : const = ( ( roaming and 'CSIDL_APPDATA' ) or 'CSIDL_LOCAL_APPDATA' ) path = os . path . join ( os . path . normpath ( _get_win_folder ( const ) ) , appname ) elif ( sys . platform == 'darwin' ) : path = os . path . join ( expanduser ( '~/Library/Application Support/' ) , appname ) else : path = os . path . join ( os . getenv ( 'XDG_DATA_HOME' , expanduser ( '~/.local/share' ) ) , appname ) return path
return full path to the user-specific data dir for this application .