Process a single character. Called by :meth:`write`.

def process (self, c):
        """Process a single character. Called by :meth:`write`."""
        if isinstance(c, bytes):
            c = self._decode(c)
        self.state.process(c)