(self, row, col, attr, fill_char_attr=None)
return col, stop_col
Delete a halfwidth character, filling with space(s) at the logical end.
        NOTE: This sets the attribute of *everything that has moved* to attr.
Delete a halfwidth character, filling with space(s) at the logical end.
        NOTE: This sets the attribute of *everything that has moved* to attr.
Delete a halfwidth character filling with space ( s ) at the logical end . NOTE : This sets the attribute of * everything that has moved * to attr .
def delete_char_attr(self, row, col, attr, fill_char_attr=None):
        """
        Delete a halfwidth character, filling with space(s) at the logical end.
        NOTE: This sets the attribute of *everything that has moved* to attr.
        """
        therow = self._rows[row-1]
        # do nothing beyond logical end of row
        if therow.length < col:
            return 0, 0
        adjust_end = fill_char_attr is None
        if fill_char_attr is None:
            fill_char, fill_attr = b' ', attr
        else:
            fill_char, fill_attr = fill_char_attr
        therow.chars[:therow.length] = (
            therow.chars[:col-1] + therow.chars[col:therow.length] + [fill_char]
        )
        therow.attrs[:therow.length] = (
            therow.attrs[:col-1] + therow.attrs[col:therow.length] + [fill_attr]
        )
        # reset the attribute of all moved chars
        stop_col = max(therow.length, col)
        therow.attrs[col-1:stop_col] = [attr] * (stop_col - col + 1)
        # change the logical end
        if adjust_end:
            therow.length = max(therow.length - 1, 0)
        self._update(row, col, stop_col)
        return col, stop_col
def delete_char_attr ( self , row , col , attr , fill_char_attr = None ) : therow = self . _rows [ row - 1 ] # do nothing beyond logical end of row if therow . length < col : return 0 , 0 adjust_end = fill_char_attr is None if fill_char_attr is None : fill_char , fill_attr = b' ' , attr else : fill_char , fill_attr = fill_char_attr therow . chars [ : therow . length ] = ( therow . chars [ : col - 1 ] + therow . chars [ col : therow . length ] + [ fill_char ] ) therow . attrs [ : therow . length ] = ( therow . attrs [ : col - 1 ] + therow . attrs [ col : therow . length ] + [ fill_attr ] ) # reset the attribute of all moved chars stop_col = max ( therow . length , col ) therow . attrs [ col - 1 : stop_col ] = [ attr ] * ( stop_col - col + 1 ) # change the logical end if adjust_end : therow . length = max ( therow . length - 1 , 0 ) self . _update ( row , col , stop_col ) return col , stop_col