def get_dirs():
 dirs = {u'XDG_CACHE_DIR': (os.environ.get(u'XDG_CACHE_HOME') or os.path.expanduser('~/.cache')), u'XDG_CONFIG_DIR': (os.environ.get(u'XDG_CONFIG_HOME') or os.path.expanduser('~/.config')), u'XDG_DATA_DIR': (os.environ.get(u'XDG_DATA_HOME') or os.path.expanduser('~/.local/share'))}
 dirs.update(_get_user_dirs(dirs[u'XDG_CONFIG_DIR']))
 return dirs

def get_dirs ( ) : dirs = { u'XDG_CACHE_DIR' : ( os . environ . get ( u'XDG_CACHE_HOME' ) or os . path . expanduser ( '~/.cache' ) ) , u'XDG_CONFIG_DIR' : ( os . environ . get ( u'XDG_CONFIG_HOME' ) or os . path . expanduser ( '~/.config' ) ) , u'XDG_DATA_DIR' : ( os . environ . get ( u'XDG_DATA_HOME' ) or os . path . expanduser ( '~/.local/share' ) ) } dirs . update ( _get_user_dirs ( dirs [ u'XDG_CONFIG_DIR' ] ) ) return dirs
returns a dict of all the known xdg base directories for the current user .