code: def write(self, text):
          
          # similar to tqdm.write()
          # https://pypi.python.org/pypi/tqdm#writing-messages
          sys.stdout.write("\r")
          self._clear_line()
  
          _text = to_unicode(text)
          if PY2:
              _text = _text.encode(ENCODING)
  
          # Ensure output is bytes for Py2 and Unicode for Py3
          assert isinstance(_text, builtin_str)
  
          sys.stdout.write("{0}\n".format(_text))
docs: Write text in the terminal without breaking the spinner.