code: def eval(self, command):
          
          for cmd, response in self.response_list:
              if not cmd.match(command):
                  continue
              if response is None:
                  return None
              elif hasattr(response, '__call__'):
                  return response(command)
              else:
                  return response
          if self.strict:
              raise Exception('Undefined command: ' + repr(command))
          return None
docs: Evaluate the given string against all registered commands and
          return the defined response.
  
          :type  command: str
          :param command: The command that is evaluated.
          :rtype:  str or None
          :return: The response, if one was defined.