(self, fore, back, blink, underline)
Set current attributes.
Set current attributes.
Set current attributes .
def set_attributes(self, fore, back, blink, underline):
        """Set current attributes."""
        # use "bold" ANSI colours for the upper 8 EGA attributes
        self._emit_ti('sgr0')
        self._emit_ti('setaf', 8 * (fore // 8) + EGA_TO_ANSI[fore % 8])
        self._emit_ti('setab', EGA_TO_ANSI[back])
        if blink:
            self._emit_ti('blink')
        if underline:
            self._emit_ti('smul')
def set_attributes ( self , fore , back , blink , underline ) : # use "bold" ANSI colours for the upper 8 EGA attributes self . _emit_ti ( 'sgr0' ) self . _emit_ti ( 'setaf' , 8 * ( fore // 8 ) + EGA_TO_ANSI [ fore % 8 ] ) self . _emit_ti ( 'setab' , EGA_TO_ANSI [ back ] ) if blink : self . _emit_ti ( 'blink' ) if underline : self . _emit_ti ( 'smul' )