def write (self, s):
        """Process text, writing it to the virtual screen while handling
        ANSI escape codes.
        """
        if isinstance(s, bytes):
            s = self._decode(s)
        for c in s:
            self.process(c)
Process text, writing it to the virtual screen while handling
        ANSI escape codes.