def get_theme_base_dir(theme_dir_name, suppress_error=False):
 for themes_dir in get_theme_base_dirs():
  if (theme_dir_name in get_theme_dirs(themes_dir)):
   return themes_dir
 if suppress_error:
  return None
 raise ValueError("Theme '{theme}' not found in any of the following themes dirs, \nTheme dirs: \n{dir}".format(theme=theme_dir_name, dir=get_theme_base_dirs()))

def get_theme_base_dir ( theme_dir_name , suppress_error = False ) : for themes_dir in get_theme_base_dirs ( ) : if ( theme_dir_name in get_theme_dirs ( themes_dir ) ) : return themes_dir if suppress_error : return None raise ValueError ( "Theme '{theme}' not found in any of the following themes dirs, \nTheme dirs: \n{dir}" . format ( theme = theme_dir_name , dir = get_theme_base_dirs ( ) ) )
returns absolute path to the directory that contains the given theme .