If verbose=True, this will print to terminal. Otherwise, it won't.
351164
def report(self, string='', level=0, prelude='', progress=False, abbreviate=True):
        ''''''
        if self._mute == False:
            self._prefix = prelude + '{spacing}[{name}] '.format(name = self.nametag, spacing = ' '*level)
            self._prefix = "{0:>16}".format(self._prefix)
            equalspaces = ' '*len(self._prefix)
            toprint = string + ''
            if abbreviate:
                if shortcuts is not None:
                    for k in shortcuts.keys():
                        toprint = toprint.replace(k, shortcuts[k])

            if progress:
                print('\r' + self._prefix + toprint.replace('\n', '\n' + equalspaces),)
            else:
                print(self._prefix + toprint.replace('\n', '\n' + equalspaces))
136545
def stderr(msg, silent=False):
    
    if not silent:
        print(msg, file=sys.stderr)
328005
def print(self, *args, **kwargs):
        '''
        
        '''
        if self._last_args and self._last_args.verbose:
            print(*args, **kwargs)
1161733
def disable_if_no_tty(cls):
        
        if sys.stdout.isatty() or sys.stderr.isatty():
            return False
        cls.disable_all_colors()
        return True
530934
def is_verbose():
    
    ctx = click.get_current_context()
    state = ctx.ensure_object(CommandState)
    return state.is_verbose()
187366
def _verbose(self, msg, level=log.debug):
        '''
        
        '''
        if self.opts.get('verbose', False) is True:
            self.ui.status(msg)
        level(msg)
850824
def verbose(self):
        

        log = copy.copy(self)
        log._is_verbose = True
        return log
305465
def check_vprint(s, vprinter):
    ''''''
    if vprinter is True:
        print(s);
    elif callable(vprinter):
        vprinter(s);
204915
def do_continue(self, args):
        
        self._do_print_from_last_cmd = True
        self._interp.cont()
        return True
167824
def log(self, text, key="?????", force=False):
        """"""
        if force or self.verbose:
            print ">>>> {} {}".format(key, text)
            sys.stdout.flush()
375139
def _show(self, message, indent=0, enable_verbose=True):  # pragma: no cover
        
        if enable_verbose:
            print("    " * indent + message)
390245
def safeprint(message, write_to_stderr=False, newline=True):
    
    try:
        click.echo(message, nl=newline, err=write_to_stderr)
    except IOError as err:
        if err.errno is errno.EPIPE:
            pass
        else:
            raise
1321503
def printd(*args, **kwargs):
    """"""

    global settings
    if settings['PRINT_DEBUG_STATE']:
        print(*args, **kwargs)
        return True
    return False
539770
def s(command, verbose=False, fail_fast=True, interactive=False):
    

    completed_process = None
    output = None
    if interactive:
        completed_process = subprocess.run(
            command,
            shell=True,
            stdin=sys.stdin,
            stdout=sys.stdout,
            stderr=sys.stderr,
        )
        output = {
            "exit_code": completed_process.returncode,
        }
    else:
        completed_process = subprocess.run(
            command,
            shell=True,
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
        )
        output = {
            "exit_code": completed_process.returncode,
            "out": completed_process.stdout.decode('utf-8'),
            "err": completed_process.stderr.decode('utf-8'),
        }

    result = None
    if completed_process.returncode == 0:
        result = cmn.OkResult(output)
    else:
        result = cmn.ErrorResult(output)

    fail = fail_fast and not result.ok

    if verbose or fail:
        cmn.logger.log(
            "Executed shell command '{command}'\n"
            "exit code was: {exit_code}\n".format(
                command=command,
                **result.value
            )
        )

    if (verbose or fail) and not interactive:
        cmn.logger.log(
            "stdout was:\n{out}\n"
            "stderr was:\n{err}".format(
                **result.value
            )
        )

    if fail:
        cmn.fail("Failed executing shell command '{command}'".format(command=command))

    return result
1105462
def verbose(self, msg, *args, **kw):
        """"""
        if self.isEnabledFor(VERBOSE):
            self._log(VERBOSE, msg, args, **kw)
645339
def printlog(self, string, verbose=None, flush=False):
        """"""
        if self.writelog:
            self.logger.info(string)
        if verbose or (self.verbose and verbose is None):
            print(string, flush=flush)
831307
def _print_message(self, text, fd=None):
        '''
        
        '''
        # Since we have the async->sync->async problem, queue up and print at exit
        self.root.mesgs.extend(text.split('\n'))