Build a nice status message and print it to stdout.
341477
def _status_command(cast, ramp):
    
    if ramp.is_playing:
        play_symbol = u'\u25B6'
    else:
        play_symbol = u'\u2759\u2759'

    print u' %s %s by %s from %s via %s, %s of %s' % (
        play_symbol,
        ramp.title,
        ramp.artist,
        ramp.album,
        cast.app.app_id,
        _to_minutes(ramp.current_time),
        _to_minutes(ramp.duration)
    )
563411
def _emit_message(cls, message):
        """"""
        sys.stdout.write(message)
        sys.stdout.flush()
359230
public static String printStatus(int status)
    {
        switch (status)
        {
        case Status.STATUS_ACTIVE:
            return "Status.STATUS_ACTIVE";
        case Status.STATUS_COMMITTED:
            return "Status.STATUS_COMMITTED";
        case Status.STATUS_COMMITTING:
            return "Status.STATUS_COMMITTING";
        case Status.STATUS_MARKED_ROLLBACK:
            return "Status.STATUS_MARKED_ROLLBACK";
        case Status.STATUS_NO_TRANSACTION:
            return "Status.STATUS_NO_TRANSACTION";
        case Status.STATUS_PREPARED:
            return "Status.STATUS_PREPARED";
        case Status.STATUS_PREPARING:
            return "Status.STATUS_PREPARING";
        case Status.STATUS_ROLLEDBACK:
            return "Status.STATUS_ROLLEDBACK";
        case Status.STATUS_ROLLING_BACK:
            return "Status.STATUS_ROLLING_BACK";
        default:
            return "Status.STATUS_UNKNOWN";
        }
    }
1150674
def printWelcomeMessage(msg, place=10):
    '''  '''
    logging.debug('*' * 30)
    welcome = ' ' * place
    welcome+= msg
    logging.debug(welcome)

    logging.debug('*' * 30 + '\n')
80300
def log(self, output, exit_status):
        """"""
        if exit_status != 0:
            self.logger.error(f'Error running command! Exit status: {exit_status}, {output}')

        return exit_status
755203
def cmd_msg(self, args):
        ''''''
        if len(args) == 0:
            print(self.usage())
        txt = ' '.join(args)
        self.master.mav.statustext_send(mavutil.mavlink.MAV_SEVERITY_NOTICE,
                                        txt)
432133
def pretty_print(self, warnings=False):
        
        msg = []
        if (warnings) and (len(self.warnings) > 0):
            msg.append(u"Warnings:")
            for warning in self.warnings:
                msg.append(u"  %s" % warning)
        if len(self.errors) > 0:
            msg.append(u"Errors:")
            for error in self.errors:
                msg.append(u"  %s" % error)
        return u"\n".join(msg)
1110036
def _start_print(self):
        
        if self._start_no_nl:
            sys.stdout.write(self._start_msg)
            sys.stdout.flush()
        else:
            print(self._start_msg)
1008242
def print_prompt(prompt,msg_id=None):
    """"""
    global show_execution_count
    if show_execution_count and msg_id:
        # wait to get message back from kernel
        try:
            child = get_child_msg(msg_id)
            count = child['content']['execution_count']
            echo("In[%d]: %s" %(count,prompt))
        except Empty:
            echo("In[]: %s (no reply from IPython kernel)" % prompt)
    else:
        echo("In[]: %s" % prompt)
1200584
def output_to_bar(self, message, comma=True):
        
        if comma:
            message += ','
        sys.stdout.write(message + '\n')
        sys.stdout.flush()
49784
def do_status(self, args):
        ''''''
        work_spec_name = self._get_work_spec_name(args)
        status = self.task_master.status(work_spec_name)
        self.stdout.write(json.dumps(status, indent=4, sort_keys=True) +
                          '\n')
385553
def status(sec):
    
    if _meta_.prg_bar in ["on", "ON"]:
        syms = ["|", "/", "-", "\\"]
        for sym in syms:
            sys.stdout.write("\b{0}{1}{2}".format(_meta_.color["GREY"], sym,
                                                  _meta_.color["ENDC"]))
            sys.stdout.flush()
            time.sleep(float(sec))
1310191
def _printM(self, messages):
        """"""
        if len(messages) == 2:
            print(Style.BRIGHT + messages[0] + Style.RESET_ALL +
                  Fore.BLUE + messages[1] + Style.RESET_ALL)
        else:
            print("Not implemented")
385349
def handleStatus(self, version, status, message):
        """"""

        self.status = status
        self.message = message
715741
def write(self):
        ''''''
        f = open('status.txt', mode='w')
        self.show(f)
        f.close()
269818
def print_status(raw_status, strip_units=False):
    
    lines = split(raw_status)
    if strip_units:
        lines = strip_units_from_lines(lines)
    for line in lines:
        print(line)
976637
def message(self, data, kind="info"):
        """"""
        message = pd.io.json.dumps({'kind': kind, 'data': data})
        print("Sent {0} bytes.".format(len(message)))
        self.write_message(message)