(self, attr)
return fore, back, blink, underline
Split textmode attribute byte into constituent parts.
Split textmode attribute byte into constituent parts.
Split textmode attribute byte into constituent parts .
def split_attr(self, attr):
        """Split textmode attribute byte into constituent parts."""
        # 7  6 5 4  3 2 1 0
        # Bl b b b  f f f f
        back = (attr >> 4) & 7
        blink = (attr >> 7) == 1
        fore = attr & 0xf
        underline = False
        return fore, back, blink, underline
def split_attr ( self , attr ) : # 7  6 5 4  3 2 1 0 # Bl b b b  f f f f back = ( attr >> 4 ) & 7 blink = ( attr >> 7 ) == 1 fore = attr & 0xf underline = False return fore , back , blink , underline