code: def console_output(msg, logging_msg=None):
      
      assert isinstance(msg, bytes)
      assert isinstance(logging_msg, bytes) or logging_msg is None
  
      from polysh import remote_dispatcher
  
      remote_dispatcher.log(logging_msg or msg)
      if remote_dispatcher.options.interactive:
          from polysh.stdin import the_stdin_thread
          the_stdin_thread.no_raw_input()
          global last_status_length
          if last_status_length:
              safe_write('\r{}\r'.format(
                  last_status_length * ' ').encode())
              last_status_length = 0
      safe_write(msg)
docs: Use instead of print, to clear the status information before printing