(self, s)
Write to printer stream.
Write to printer stream.
Write to printer stream .
def write(self, s):
        """Write to printer stream."""
        for c in iterchar(s):
            if c == b'\b':
                # backspace: drop a non-newline character from the buffer
                self.seek(-1, 1)
                if self.read(1) not in (b'\r', b'\n', b'\f'):
                    self.seek(-1, 1)
                    self.truncate()
            io.BytesIO.write(self, c)
            if c == self._flush_trigger:
                self.flush()
def write ( self , s ) : for c in iterchar ( s ) : if c == b'\b' : # backspace: drop a non-newline character from the buffer self . seek ( - 1 , 1 ) if self . read ( 1 ) not in ( b'\r' , b'\n' , b'\f' ) : self . seek ( - 1 , 1 ) self . truncate ( ) io . BytesIO . write ( self , c ) if c == self . _flush_trigger : self . flush ( )