Prints alerts and updates the prompt any time the prompt is showing
492
def _alerter_thread_func(self) -> None:
        

        self._alert_count = 0
        self._next_alert_time = 0

        while not self._stop_thread:
            # Always acquire terminal_lock before printing alerts or updating the prompt
            # To keep the app responsive, do not block on this call
            if self.terminal_lock.acquire(blocking=False):

                # Get any alerts that need to be printed
                alert_str = self._generate_alert_str()

                # Generate a new prompt
                new_prompt = self._generate_colored_prompt()

                # Check if we have alerts to print
                if alert_str:
                    # new_prompt is an optional parameter to async_alert()
                    self.async_alert(alert_str, new_prompt)
                    new_title = "Alerts Printed: {}".format(self._alert_count)
                    self.set_window_title(new_title)

                # No alerts needed to be printed, check if the prompt changed
                elif new_prompt != self.prompt:
                    self.async_update_prompt(new_prompt)

                # Don't forget to release the lock
                self.terminal_lock.release()

            time.sleep(0.5)
516774
function Prompt( question, rl, answers ) {

  // Setup instance defaults property
  _.assign( this, {
    height : 0,
    status : "pending"
  });

  // Set defaults prompt options
  this.opt = _.defaults( _.clone(question), {
    validate: function() { return true; },
    filter: function( val ) { return val; },
    when: function() { return true; }
  });

  // Check to make sure prompt requirements are there
  if (!this.opt.message) {
    this.throwParamError("message");
  }
  if (!this.opt.name) {
    this.throwParamError("name");
  }

  // Normalize choices
  if ( _.isArray(this.opt.choices) ) {
    this.opt.choices = new Choices( this.opt.choices, answers );
  }

  this.rl = rl;

  return this;
}
452921
def prompt(text, default=None, show_default=True, invisible=False,
           confirm=False, skip=False, type=None, input_function=None):
	'''
	'''
	t = determine_type(type, default)
	input_function = get_input_fn(input_function, invisible)
	if default is not None and show_default:
		text = '{} [{}]: '.format(text, default)
	while True:
		val = prompt_fn(input_function, text, default, t, skip, repeat=True)
		if not confirm or (skip and val is None):
			return val
		if val == prompt_fn(input_function, 'Confirm: ', default, t, repeat=True):
			return val
		echo('Error: The two values you entered do not match', True)
1127270
def _prompt(self, prompt=None):
        
        if prompt:
            # Print the prompt
            self.write(prompt)
            self.output.flush()

        # Read the line
        return to_str(self.input.readline())
1129945
def update_prompt(self):
        
        prefix = ""
        if self._local_endpoint is not None:
            prefix += "(%s:%d) " % self._local_endpoint
        prefix += self.engine.region
        if self.engine.partial:
            self.prompt = len(prefix) * " " + "> "
        else:
            self.prompt = prefix + "> "
451701
function print() {
    getLoggers().forEach(function (logger) {
        consoleAppender.log(formatText('Logger %b: %b, parent:%b', logger.name, logger.level, logger.parent));
    });
}
522885
def pause(msg="Press Enter to Continue..."):
    """"""
    print('\n' + Fore.YELLOW + msg + Fore.RESET, end='')
    input()
1058841
def continue_prompt(message=""):
    
    answer = False
    message = message + "\n'Yes' or 'No' to continue: "
    while answer not in ('Yes', 'No'):
        answer = prompt(message, eventloop=eventloop())
        if answer == "Yes":
            answer = True
            break
        if answer == "No":
            answer = False
            break
    return answer
318604
@Override
    public void indicateProgress() {
        verifySystemOut();
        progressIndicatorActive = true;
        if (isAnsiEnabled()) {
            if (lastMessage != null && lastMessage.length() > 0) {
                if (!lastMessage.contains(maxIndicatorString)) {
                    updateStatus(lastMessage + indicator);
                }
            }
        } else {
            out.print(indicator);
        }
    }
515253
protected function maybe_prompt() {
		if ( ! $this->is_time() ) {
			return;
		}

		\add_action( 'admin_footer', array( $this, 'script' ) );
		if ( false !== $this->op['notice_callback'] ) {
			call_user_func_array( $this->op['notice_callback'], array( &$this ) );
		} else {
			\add_action( 'admin_notices', array( $this, 'add_notice' ) );
		}
	}
1109929
function Prompt () {
  Base.apply(this, arguments);

  if (!this.opt.basePath) {
    this.throwParamError('basePath');
  }

  this.pathIndexHash = {};
  this.originalBaseDir = this.currentPath =
    path.normalize(path.isAbsolute(this.opt.basePath) ?
      path.resolve(this.opt.basePath) : path.resolve(process.cwd(), this.opt.basePath));

  if (String(this.currentPath).endsWith(path.sep)) {
    this.currentPath = String(this.currentPath).slice(0, -1);
  }

  this.onlyOneFile = !!this.opt.onlyOneFile;

  this.opt.choices = new Choices(this.createChoices(this.currentPath), this.answers);
  this.selected = 0;

  if (this.opt.filterItems) {
    assert(typeof this.opt.filterItems === 'function', ' "filterItems" option property must be a function.');
  }

  this.firstRender = true;

  // Make sure no default is set (so it won't be printed)
  this.opt.default = null;
  this.searchTerm = '';
  this.paginator = new Paginator();
}
1061183
def _notify_change(self):
        
        def inner_action(*args):
            """ Inner action: open file """
            # cache cursor position before reloading so that the cursor
            # position is restored automatically after reload has finished.
            # See OpenCobolIDE/OpenCobolIDE#97
            Cache().set_cursor_position(
                self.editor.file.path,
                self.editor.textCursor().position())
            if os.path.exists(self.editor.file.path):
                self.editor.file.open(self.editor.file.path)
                self.file_reloaded.emit()
            else:
                # file moved just after a change, see OpenCobolIDE/OpenCobolIDE#337
                self._notify_deleted_file()

        args = (_("File changed"),
                _("The file <i>%s</i> has changed externally.\nDo you want to "
                  "reload it?") % os.path.basename(self.editor.file.path))
        kwargs = {"expected_action": inner_action}
        if self.editor.hasFocus() or self.auto_reload:
            self._notify(*args, **kwargs)
        else:
            # show the reload prompt as soon as the editor has focus
            self._notification_pending = True
            self._data = (args, kwargs)
1233743
def __print(self, msg):
        """"""
        self.announce(msg, level=distutils.log.INFO)
928148
def make_dynamic_prompt(self, prompt):
        """"""
        if prompt:
            self.prompt_re = self.driver.make_dynamic_prompt(prompt)
872178
def notify(title, message, retcode=None):
    """"""
    if not path.exists(config_file):
        if not path.exists(config_dir):
            makedirs(config_dir)
        print("Follow the instructions to configure the Telegram backend.\n")
        configure(config_file)
    send(messages=[message], conf=config_file)
588506
def interactive_prompt(message, parameters, default_opts):
    

    # pretty-print the message
    lines = message.split('\n')
    max_line_len = max([len(l) for l in lines])

    print('-' * max_line_len)
    print(message)
    print('-' * max_line_len)

    ret = {}
    for param in parameters:
        formatted_param = param
        prompt_str = '{}: '.format(formatted_param)
        if param in default_opts:
            prompt_str = '{} (default: "{}"): '.format(formatted_param, default_opts[param])

        try:
            value = raw_input(prompt_str)
        except KeyboardInterrupt:
            log.debug('Exiting on keyboard interrupt')
            sys.exit(0)

        if len(value) > 0:
            ret[param] = value
        elif param in default_opts:
            ret[param] = default_opts[param]
        else:
            ret[param] = None

    return ret
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)