(self, char, do_scroll_down=False)
Put one character at the current position.
Put one character at the current position.
Put one character at the current position .
def write_char(self, char, do_scroll_down=False):
        """Put one character at the current position."""
        # check if scroll & repositioning needed
        if self.overflow:
            self.current_col += 1
            self.overflow = False
        # see if we need to wrap and scroll down
        self._check_wrap(do_scroll_down)
        # move cursor and see if we need to scroll up
        self._update_cursor_position(scroll_ok=True)
        # put the character
        self._apage.put_char_attr(
            self.current_row, self.current_col, char, self._attr, adjust_end=True
        )
        # move cursor. if on col 80, only move cursor to the next row
        # when the char is printed
        if self.current_col < self.mode.width:
            self.current_col += 1
        else:
            self.overflow = True
        # move cursor and see if we need to scroll up
        self._update_cursor_position(scroll_ok=True)
def write_char ( self , char , do_scroll_down = False ) : # check if scroll & repositioning needed if self . overflow : self . current_col += 1 self . overflow = False # see if we need to wrap and scroll down self . _check_wrap ( do_scroll_down ) # move cursor and see if we need to scroll up self . _update_cursor_position ( scroll_ok = True ) # put the character self . _apage . put_char_attr ( self . current_row , self . current_col , char , self . _attr , adjust_end = True ) # move cursor. if on col 80, only move cursor to the next row # when the char is printed if self . current_col < self . mode . width : self . current_col += 1 else : self . overflow = True # move cursor and see if we need to scroll up self . _update_cursor_position ( scroll_ok = True )