def config_dirs():
 paths = []
 if (platform.system() == u'Darwin'):
  paths.append(MAC_DIR)
  paths.append(UNIX_DIR_FALLBACK)
  if (UNIX_DIR_VAR in os.environ):
   paths.append(os.environ[UNIX_DIR_VAR])
 elif (platform.system() == u'Windows'):
  paths.append(WINDOWS_DIR_FALLBACK)
  if (WINDOWS_DIR_VAR in os.environ):
   paths.append(os.environ[WINDOWS_DIR_VAR])
 else:
  paths.append(UNIX_DIR_FALLBACK)
  if (UNIX_DIR_VAR in os.environ):
   paths.append(os.environ[UNIX_DIR_VAR])
 out = []
 for path in paths:
  path = os.path.abspath(os.path.expanduser(path))
  if (path not in out):
   out.append(path)
 return out

def config_dirs ( ) : paths = [ ] if ( platform . system ( ) == u'Darwin' ) : paths . append ( MAC_DIR ) paths . append ( UNIX_DIR_FALLBACK ) if ( UNIX_DIR_VAR in os . environ ) : paths . append ( os . environ [ UNIX_DIR_VAR ] ) elif ( platform . system ( ) == u'Windows' ) : paths . append ( WINDOWS_DIR_FALLBACK ) if ( WINDOWS_DIR_VAR in os . environ ) : paths . append ( os . environ [ WINDOWS_DIR_VAR ] ) else : paths . append ( UNIX_DIR_FALLBACK ) if ( UNIX_DIR_VAR in os . environ ) : paths . append ( os . environ [ UNIX_DIR_VAR ] ) out = [ ] for path in paths : path = os . path . abspath ( os . path . expanduser ( path ) ) if ( path not in out ) : out . append ( path ) return out
return a platform-specific list of candidates for user configuration directories on the system .