    def reset(self, text, colours):
        """
        Reset the parser to analyze the supplied raw text.

        :param text: raw text to process.
        :param colours: colour tuple to initialise the colour map.
        """
        self._state = _DotDict()
        self._state.text = text
        # Force colours to be mutable (in case a tuple was passed in).
        self._state.attributes = list(x for x in colours) if colours else None
Reset the parser to analyze the supplied raw text.

:param text: raw text to process.
:param colours: colour tuple to initialise the colour map.
asciimatics/parsers.py