Esempio n. 1
0
 def send(self, formatted_text):
     """
     Send text to the client.
     """
     formatted_text = to_formatted_text(formatted_text)
     print_formatted_text(self.vt100_output, formatted_text, self.style
                          or DummyStyle())
Esempio n. 2
0
 def send(self, formatted_text: AnyFormattedText) -> None:
     """
     Send text to the client.
     """
     if self.vt100_output is None:
         return
     formatted_text = to_formatted_text(formatted_text)
     print_formatted_text(self.vt100_output, formatted_text, self.style
                          or DummyStyle())
    def print_text(self, text, style=None):
        """
        Print a list of (style_str, text) tuples to the output.
        (When the UI is running, this method has to be called through
        `run_in_terminal`, otherwise it will destroy the UI.)

        :param text: List of ``(style_str, text)`` tuples.
        :param style: Style class to use. Defaults to the active style in the CLI.
        """
        print_formatted_text(self.output, text, style or self._merged_style, self.color_depth)
    def print_text(self, text, style=None):
        """
        Print a list of (style_str, text) tuples to the output.
        (When the UI is running, this method has to be called through
        `run_in_terminal`, otherwise it will destroy the UI.)

        :param text: List of ``(style_str, text)`` tuples.
        :param style: Style class to use. Defaults to the active style in the CLI.
        """
        print_formatted_text(
            output=self.output,
            formatted_text=text,
            style=style or self._merged_style,
            color_depth=self.color_depth,
            style_transformation=self.style_transformation)
Esempio n. 5
0
    def print_text(self, text: AnyFormattedText,
                   style: Optional[BaseStyle] = None) -> None:
        """
        Print a list of (style_str, text) tuples to the output.
        (When the UI is running, this method has to be called through
        `run_in_terminal`, otherwise it will destroy the UI.)

        :param text: List of ``(style_str, text)`` tuples.
        :param style: Style class to use. Defaults to the active style in the CLI.
        """
        print_formatted_text(
            output=self.output,
            formatted_text=text,
            style=style or self._merged_style,
            color_depth=self.color_depth,
            style_transformation=self.style_transformation)
 def send(self, formatted_text: AnyFormattedText) -> None:
     """
     Send text to the client.
     """
     formatted_text = to_formatted_text(formatted_text)
     print_formatted_text(self.vt100_output, formatted_text, self.style or DummyStyle())