code: def register_extensions(self):
          try:
              for extension, config in self.config['extensions'].items():
                  extension_bstr = ''
                  extension_pieces = extension.split('.')
                  if len(extension_pieces) > 1:
                      extension_bstr = '.'.join(extension_pieces)
                  else:
                      extension_bstr = 'glim_extensions.%s' % extension_pieces[0]
                  extension_module = import_module(extension_bstr)
                  if extension_module:
                      extension_startstr = '%s.%s' % (extension_bstr, 'start')
                      extension_start = import_module(extension_startstr, pass_errors=True)
                      extension_cmdsstr = '%s.%s' % (extension_bstr, 'commands')
                      extension_cmds = import_module(extension_cmdsstr, pass_errors=True)
                      if extension_start is not None:
                          before = extension_start.before
                          before(config)
                      if extension_cmds is not None:
                          if self.commandadapter is not None:
                              self.commandadapter.register_extension(extension_cmds, extension_pieces[0])
                  else:
                      GlimLog.error('Extension %s could not be loaded' % extension)
          except Exception as e:
              GlimLog.error(traceback.format_exc())