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