special prompt that has hidden input
770971
def ask_github_password(username = nil)
      username ||= github_username
      print "Github password for #{username} (never stored): "
      if $stdin.tty?
        password = askpass
        puts ''
        password
      else
        # in testing
        $stdin.gets.chomp
      end
    rescue Interrupt
      abort
    end
515199
def get_input(prompt, default=None, choices=None, option_value=None):
    
    if option_value is not None:
        return option_value
    
    choices = choices or []
    while 1:
        r = input(prompt+' ').strip()
        if not r and default is not None:
            return default
        if choices:
            if r not in choices:
                r = None
            else:
                break
        else:
            break
    return r
110316
function prompt(question, isYesDefault) {
  if (typeof isYesDefault !== 'boolean') {
    throw new Error(
      'Provide explicit boolean isYesDefault as second argument.'
    );
  }
  return new Promise(resolve => {
    var rlInterface = rl.createInterface({
      input: process.stdin,
      output: process.stdout,
    });

    var hint = isYesDefault === true ? '[Y/n]' : '[y/N]';
    var message = question + ' ' + hint + '\n';

    rlInterface.question(message, function(answer) {
      rlInterface.close();

      var useDefault = answer.trim().length === 0;
      if (useDefault) {
        return resolve(isYesDefault);
      }

      var isYes = answer.match(/^(yes|y)$/i);
      return resolve(isYes);
    });
  });
}
624709
def get_input(prompt, default=None, choices=None, option_value=None):
    
    if option_value is not None:
        return option_value
    
    choices = choices or []
    while 1:
        r = raw_input(prompt+' ').strip()
        if not r and default is not None:
            return default
        if choices:
            if r not in choices:
                r = None
            else:
                break
        else:
            break
    return r
1314944
function update_hidden_input(saved_tokens, hidden_input) {
          var token_values = $.map(saved_tokens, function (el) {
              if(typeof $(input).data("settings").tokenValue == 'function')
                return $(input).data("settings").tokenValue.call(this, el);

              return el[$(input).data("settings").tokenValue];
          });
          hidden_input.val(token_values.join($(input).data("settings").tokenDelimiter));

      }
809384
def prompt_pass(name, default=None):
    

    prompt = name + (default and ' [%s]' % default or '')
    prompt += name.endswith('?') and ' ' or ': '
    while True:
        rv = getpass.getpass(prompt)
        if rv:
            return rv
        if default is not None:
            return default
625895
def _PromptUserForInput(self, input_text):
    
    self._output_writer.Write('{0:s}: '.format(input_text))
    return self._input_reader.Read()
790319
private void handleHidden(FormInput input) {
		String text = input.getInputValues().iterator().next().getValue();
		if (null == text || text.length() == 0) {
			return;
		}
		WebElement inputElement = browser.getWebElement(input.getIdentification());
		JavascriptExecutor js = (JavascriptExecutor) browser.getWebDriver();
		js.executeScript("arguments[0].setAttribute(arguments[1], arguments[2]);", inputElement,
				"value", text);
	}
706881
def input(msg="", default="", title="Lackey Input", hidden=False):
    
    root = tk.Tk()
    input_text = tk.StringVar()
    input_text.set(default)
    PopupInput(root, msg, title, hidden, input_text)
    root.focus_force()
    root.mainloop()
    return str(input_text.get())
1128248
def raw_input_replacement(self, prompt=''):
        """"""
        self.widget_proxy.wait_input(prompt)
        self.input_condition.acquire()
        while not self.widget_proxy.data_available():
            self.input_condition.wait()
        inp = self.widget_proxy.input_data
        self.input_condition.release()
        return inp
1218219
def print_prompt_values(values, message=None, sub_attr=None):
    """"""
    if message:
        prompt_message(message)

    for index, entry in enumerate(values):
        if sub_attr:
            line = '{:2d}: {}'.format(index, getattr(utf8(entry), sub_attr))
        else:
            line = '{:2d}: {}'.format(index, utf8(entry))

        with indent(3):
            print_message(line)
836734
def prompt(name, default=None):
    

    prompt = name + (default and ' [%s]' % default or '')
    prompt += name.endswith('?') and ' ' or ': '
    while True:
        try:
            rv = raw_input(prompt)
        except NameError:
            rv = input(prompt)
        if rv:
            return rv
        if default is not None:
            return default
36498
def prompt(prompt_string, default=None, secret=False, boolean=False, bool_type=None):
    
    if boolean or bool_type in BOOLEAN_DEFAULTS:
        if bool_type is None:
            bool_type = 'y_n'
        default_msg = BOOLEAN_DEFAULTS[bool_type][is_affirmative(default)]
    else:
        default_msg = " (default {val}): "
    prompt_string += (default_msg.format(val=default) if default else ": ")
    if secret:
        val = getpass(prompt_string)
    else:
        val = input(prompt_string)
    val = (val if val else default)
    if boolean:
        val = val.lower().startswith('y')
    return val
120403
def render_hidden(name, value):
    
    if isinstance(value, list):
        return MultipleHiddenInput().render(name, value)
    return HiddenInput().render(name, value)
4609
def confirm(prompt):
    
    while True:
        try:
            answer = input(prompt)
        except KeyboardInterrupt:
            # the user presses ctrl+c, just say 'no'
            return False
        answer = answer.strip().lower()
        if answer not in ('y', 'n'):
            print('Please enter y or n')
            continue
        return answer == 'y'
928148
def make_dynamic_prompt(self, prompt):
        """"""
        if prompt:
            self.prompt_re = self.driver.make_dynamic_prompt(prompt)
249280
def prompt(p, yes_no=false)
      puts #newline for newline's sake!

      loop do
        print p, ' '
        line = STDIN.readline.strip
        if yes_no
          return true if line =~ YES
          return false if line =~ NO
        else
          return line
        end
      end
    end