code: 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()
docs: 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