code: def read_glossaries(self):
          '''
          Read all existing glossaries in the main aux-file.
          '''
          filename = '%s.aux' % self.project_name
          with open(filename) as fobj:
              main_aux = fobj.read()
  
          pattern = r'\\@newglossary\{(.*)\}\{.*\}\{(.*)\}\{(.*)\}'
          for match in re.finditer(pattern, main_aux):
              name, ext_i, ext_o = match.groups()
              self.glossaries[name] = (ext_i, ext_of read_glossaries(self):
          '''
          Read all existing glossaries in the main aux-file.
          '''
          filename = '%s.aux' % self.project_name
          with open(filename) as fobj:
              main_aux = fobj.read()
  
          pattern = r'\\@newglossary\{(.*)\}\{.*\}\{(.*)\}\{(.*)\}'
          for match in re.finditer(pattern, main_aux):
              name, ext_i, ext_o = match.groups()
              self.glossaries[name] = (ext_i, ext_o)
docs: Read all existing glossaries in the main aux-file.