def _text_attr(self, attr):
        """
        Given a text attribute, set the current cursor appropriately.
        """
        attr = text[attr]
        if attr == "reset":
            self.cursor_attributes = self.default_attributes
        elif attr == "underline-off":
            self.cursor_attributes = self._remove_text_attr("underline")
        elif attr == "blink-off":
            self.cursor_attributes = self._remove_text_attr("blink")
        elif attr == "reverse-off":
            self.cursor_attributes = self._remove_text_attr("reverse")
        else:
            self.cursor_attributes = self._add_text_attr(attr)
def _text_attr ( self , attr ) : attr = text [ attr ] if attr == "reset" : self . cursor_attributes = self . default_attributes elif attr == "underline-off" : self . cursor_attributes = self . _remove_text_attr ( "underline" ) elif attr == "blink-off" : self . cursor_attributes = self . _remove_text_attr ( "blink" ) elif attr == "reverse-off" : self . cursor_attributes = self . _remove_text_attr ( "reverse" ) else : self . cursor_attributes = self . _add_text_attr ( attr )
Given a text attribute, set the current cursor appropriately.