Prints the supplied text to the device, scrolling where necessary.
        The text is always followed by a newline.

        :param text: The text to print.
        :type text: str
548433
def println(self, text=""):
        
        if self.word_wrap:
            # find directives in complete text
            directives = ansi_color.find_directives(text, self)

            # strip ansi from text
            clean_text = ansi_color.strip_ansi_codes(text)

            # wrap clean text
            clean_lines = self.tw.wrap(clean_text)

            # print wrapped text
            index = 0
            for line in clean_lines:
                line_length = len(line)
                y = 0
                while y < line_length:
                    method, args = directives[index]
                    if method == self.putch:
                        y += 1
                    method(*args)
                    index += 1
                self.newline()
        else:
            self.puts(text)
            self.newline()
1184975
def printcolour(text, sameline=False, colour=get_colour("ENDC")):
    
    if sameline:
        sep = ''
    else:
        sep = '\n'
    sys.stdout.write(get_colour(colour) + text + bcolours["ENDC"] + sep)
625180
def write(self, text):
        ''

        # Add color to the terminal.
        if not self.no_color:
            text = self.colorize_text(text)
        else:
            pattern = re.compile('\<\<[A-Z]*?\>\>')
            text = pattern.sub('', text)

        text += '\n'

        self.buffer.write(text)

        return self
1373151
def run(self, text):
        
        for pp in self.pre_processors:
            text = pp.run(text)
        return text
825794
def set_value(self, text):
        
        if self.single_line:
            text = text.replace('\n', '')
        self.set_text(text)
221527
public T text(CharSequence text) {

        if (view instanceof TextView) {
            TextView tv = (TextView) view;
            tv.setText(text);
        }

        return self();
    }
496665
def with_text(self, text, markdown=None):
        '''
        '''
        self._text = text
        self._markdown = markdown or False

        return self
1333721
def setText(self, text):
        
        super(XTextEdit, self).setText(projex.text.toAscii(text))
144363
def success(text):
    ''''''
    print(' '.join((green('✔'), white(text))))
    sys.stdout.flush()
1362627
def writeline(self, text):
        """"""
        log.debug('writing line %r' % text)
        self.write(text+chr(10))
439762
public void printWrapped(PrintWriter pw, int width, String text)
    {
        printWrapped(pw, width, 0, text);
    }
648017
def write(self, text: str):
        
        # Default color is NORMAL.
        last_color = (self._DARK_CODE, 0)
        # We use splitlines with keepends in order to keep the line breaks.
        # Then we split by using the console width.
        original_lines = text.splitlines(True)
        lines = self._split_lines(original_lines) if self._width_limit else original_lines

        # Print the new width-formatted lines.
        for line in lines:
            # Print indents only at line beginnings.
            if not self._in_line:
                self._writer.write(' ' * self.indents_sum)
            # Remove colors if needed.
            if not self._colors:
                for color_code in self._ANSI_REGEXP.findall(line):
                    line = line.replace(self._ANSI_COLOR_CODE % (color_code[0], int(color_code[1])), '')
            elif not self._ANSI_REGEXP.match(line):
                # Check if the line starts with a color. If not, we apply the color from the last line.
                line = self._ANSI_COLOR_CODE % (last_color[0], int(last_color[1])) + line
            # Print the final line.
            self._writer.write(line)
            # Update the in_line status.
            self._in_line = not line.endswith(self.LINE_SEP)
            # Update the last color used.
            if self._colors:
                last_color = self._ANSI_REGEXP.findall(line)[-1]

        # Update last position (if there was no line break in the end).
        if len(lines) > 0:
            last_line = lines[-1]
            if not last_line.endswith(self.LINE_SEP):
                # Strip the colors to figure out the real number of characters in the line.
                if self._colors:
                    for color_code in self._ANSI_REGEXP.findall(last_line):
                        last_line = last_line.replace(self._ANSI_COLOR_CODE % (color_code[0], int(color_code[1])), '')
                self._last_position += len(last_line)
            else:
                self._last_position = 0
                self._is_first_line = False
        else:
            self._last_position = 0

        # Reset colors for the next print.
        if self._colors and not text.endswith(self.NORMAL):
            self._writer.write(self.NORMAL)
420773
def pager(__text: str, *, pager: Optional[str] = 'less'):
    
    if pager:
        run([pager, ], input=__text.encode())
    else:
        print(__text)
665750
def show_message(
            self,
            text_string,
            scroll_speed=.1,
            text_colour=[255, 255, 255],
            back_colour=[0, 0, 0]
        ):
        

        # We must rotate the pixel map left through 90 degrees when drawing
        # text, see _load_text_assets
        previous_rotation = self._rotation
        self._rotation -= 90
        if self._rotation < 0:
            self._rotation = 270
        dummy_colour = [None, None, None]
        string_padding = [dummy_colour] * 64
        letter_padding = [dummy_colour] * 8
        # Build pixels from dictionary
        scroll_pixels = []
        scroll_pixels.extend(string_padding)
        for s in text_string:
            scroll_pixels.extend(self._trim_whitespace(self._get_char_pixels(s)))
            scroll_pixels.extend(letter_padding)
        scroll_pixels.extend(string_padding)
        # Recolour pixels as necessary
        coloured_pixels = [
            text_colour if pixel == [255, 255, 255] else back_colour
            for pixel in scroll_pixels
        ]
        # Shift right by 8 pixels per frame to scroll
        scroll_length = len(coloured_pixels) // 8
        for i in range(scroll_length - 8):
            start = i * 8
            end = start + 64
            self.set_pixels(coloured_pixels[start:end])
            time.sleep(scroll_speed)
        self._rotation = previous_rotation
934835
def debug_text_simple(self, text: str):
        
        self._debug_texts.append(self.to_debug_message(text))
1075318
def print_line(line):
    
    sys.__stdout__.write("{}\n".format(line))
    sys.__stdout__.flush()
735250
def print(self, txt: str, hold: bool=False) -> None:
        
        if hold:
            self.held_prints[self.trace_depth] = txt
        elif self.held_prints[self.trace_depth]:
            if self.max_print_depth > self.trace_depth:
                print(self.held_prints[self.trace_depth])
                print(txt)
                self.max_print_depth = self.trace_depth
            del self.held_prints[self.trace_depth]
        else:
            print(txt)
            self.max_print_depth = self.trace_depth