Get program options.
355484
def get_options(self):
        
        self.add_bool_option("-q", "--quiet",
            help="omit informational logging")
        self.add_bool_option("-v", "--verbose",
            help="increase informational logging")
        self.add_bool_option("--debug",
            help="always show stack-traces for errors")
        self.add_bool_option("--cron",
            help="run in cron mode (with different logging configuration)")

        # Template method to add options of derived class
        self.add_options()

        self.handle_completion()
        self.options, self.args = self.parser.parse_args()

        # Override logging options in debug mode
        if self.options.debug:
            self.options.verbose = True
            self.options.quiet = False

        # Set logging levels
        if self.options.cron:
            self.STD_LOG_LEVEL = logging.DEBUG  # pylint: disable=invalid-name
        if self.options.verbose and self.options.quiet:
            self.parser.error("Don't know how to be quietly verbose!")
        elif self.options.quiet:
            logging.getLogger().setLevel(logging.WARNING)
        elif self.options.verbose:
            logging.getLogger().setLevel(logging.DEBUG)

        self.LOG.debug("Options: %s" % ", ".join("%s=%r" % i for i in sorted(vars(self.options).items())))
969524
def get_option(self, key):
        """"""
        return self._options.get(key, self._default_options[key])
508638
def get_options(self):
        
        super(ScriptBaseWithConfig, self).get_options()

        self.config_dir = os.path.abspath(os.path.expanduser(self.options.config_dir
            or os.environ.get('PYRO_CONFIG_DIR', None)
            or self.CONFIG_DIR_DEFAULT))
        load_config.ConfigLoader(self.config_dir).load(self.OPTIONAL_CFG_FILES + self.options.config_file)
        if self.options.debug:
            config.debug = True

        for key_val in self.options.defines:
            try:
                key, val = key_val.split('=', 1)
            except ValueError, exc:
                raise error.UserError("Bad config override %r (%s)" % (key_val, exc))
            else:
                setattr(config, key, load_config.validate(key, val))
382678
function getOption(opts, key, def) {
  var value = opts[key];
  return value === undefined ? def : value;
}
511239
def get_options(config=None):
    """"""
    if config is None:
        from . import config
        config.get = lambda key, default=None: getattr(config, key, default)

    base = {
        "components": config.get("COMPONENTS"),
        "signatures": config.get("SIGNATURES"),
        "commit_msg_template": config.get("COMMIT_MSG_TEMPLATE"),
        "commit_msg_labels": config.get("COMMIT_MSG_LABELS"),
        "alt_signatures": config.get("ALT_SIGNATURES"),
        "trusted": config.get("TRUSTED_DEVELOPERS"),
        "pep8": config.get("CHECK_PEP8", True),
        "pydocstyle": config.get("CHECK_PYDOCSTYLE", True),
        "license": config.get("CHECK_LICENSE", True),
        "pyflakes": config.get("CHECK_PYFLAKES", True),
        "ignore": config.get("IGNORE"),
        "select": config.get("SELECT"),
        "match": config.get("PYDOCSTYLE_MATCH"),
        "match_dir": config.get("PYDOCSTYLE_MATCH_DIR"),
        "min_reviewers": config.get("MIN_REVIEWERS"),
        "colors": config.get("COLORS", True),
        "excludes": config.get("EXCLUDES", []),
        "authors": config.get("AUTHORS"),
        "exclude_author_names": config.get("EXCLUDE_AUTHOR_NAMES"),
    }
    options = {}
    for k, v in base.items():
        if v is not None:
            options[k] = v
    return options
1108172
function detectUserOptions () {
	let outputPath = program.output;
	let userOptions = {
		output: false
	};

	cliProps.forEach(prop => {
		let value = program[prop];

		if ((prop === 'stream' || prop === 'langdetect') && value) {
			return;
		}
		if (value !== undefined) {
			userOptions[prop] = value;
		}
	});
	if (typeof outputPath === 'string' && outputPath.length) {
		userOptions.output = outputPath;
	}
	return userOptions;
}
1321387
def get_program_path():
    """"""

    src_folder = os.path.dirname(__file__)
    program_path = os.sep.join(src_folder.split(os.sep)[:-1]) + os.sep

    return program_path
687836
def get_options_dict(self):
        """"""
        d = self.synchronizer.options if self.synchronizer else {}
        d.update(self.extra_opts)
        return d
1190181
def program_select(self, chan, sfid, bank, preset):
        """"""
        return fluid_synth_program_select(self.synth, chan, sfid, bank, preset)
91004
def get_options(cls, items, options, warnfn):
        ""
        options = cls.update_options(options, items)
        for keyword in cls.defaults:
            if keyword in items:
                value = items[keyword]
                allowed = cls.allowed[keyword]
                if isinstance(allowed, set):  pass
                elif isinstance(allowed, dict):
                    if not isinstance(value, dict):
                        raise ValueError("Value %r not a dict type" % value)
                    disallowed = set(value.keys()) - set(allowed.keys())
                    if disallowed:
                        raise ValueError("Keywords %r for %r option not one of %s"
                                         % (disallowed, keyword, allowed))
                    wrong_type = {k: v for k, v in value.items()
                                  if not isinstance(v, allowed[k])}
                    if wrong_type:
                        errors = []
                        for k,v in wrong_type.items():
                            errors.append("Value %r for %r option's %r attribute not of type %r" %
                                          (v, keyword, k, allowed[k]))
                        raise ValueError('\n'.join(errors))
                elif isinstance(allowed, list) and value not in allowed:
                    if keyword in cls.custom_exceptions:
                        cls.custom_exceptions[keyword](value, keyword, allowed)
                    else:
                        raise ValueError("Value %r for key %r not one of %s"
                                         % (value, keyword, allowed))
                elif isinstance(allowed, tuple):
                    if not (allowed[0] <= value <= allowed[1]):
                        info = (keyword,value)+allowed
                        raise ValueError("Value %r for key %r not between %s and %s" % info)
                options[keyword] = value
        return cls._validate(options, items, warnfn)
103574
def options(self):

		'''
		
		'''

		# http request
		response = self.repo.api.http_request('OPTIONS', self.uri)
		return response.headers
922128
def which(program):
    "  "

    head, _ = op.split(program)

    if head:
        if is_exe(program):
            return program
    else:
        for path in environ["PATH"].split(pathsep):
            exe_file = op.join(path, program)
            if is_exe(exe_file):
                return exe_file
    return None
727348
public static String getOptions() throws InvalidBrowserOptionsException {
        String options = getProgramProperty(OPTIONS);
        if (options == null || "".equals(options)) {
            throw new InvalidBrowserOptionsException("Browser options aren't set");
        }
        return options;
    }
987024
def get_program_args(self):
    
    ret = []
    for arg in self.get_options().program_args:
      ret.extend(safe_shlex_split(arg))
    return ret
710138
def get(self):
        """"""
        return {k:v for k,v in list(self.options.items()) if k in self._allowed_layout}
852094
def _get_options(**kwargs):
    '''
    
    '''
    # Get repo options from the kwargs
    fromrepo = kwargs.pop('fromrepo', '')
    repo = kwargs.pop('repo', '')
    disablerepo = kwargs.pop('disablerepo', '')
    enablerepo = kwargs.pop('enablerepo', '')
    disableexcludes = kwargs.pop('disableexcludes', '')
    branch = kwargs.pop('branch', '')
    setopt = kwargs.pop('setopt', None)
    if setopt is None:
        setopt = []
    else:
        setopt = salt.utils.args.split_input(setopt)
    get_extra_options = kwargs.pop('get_extra_options', False)

    # Support old 'repo' argument
    if repo and not fromrepo:
        fromrepo = repo

    ret = []

    if fromrepo:
        log.info('Restricting to repo \'%s\'', fromrepo)
        ret.extend(['--disablerepo=*', '--enablerepo={0}'.format(fromrepo)])
    else:
        if disablerepo:
            targets = [disablerepo] \
                if not isinstance(disablerepo, list) \
                else disablerepo
            log.info('Disabling repo(s): %s', ', '.join(targets))
            ret.extend(
                ['--disablerepo={0}'.format(x) for x in targets]
            )
        if enablerepo:
            targets = [enablerepo] \
                if not isinstance(enablerepo, list) \
                else enablerepo
            log.info('Enabling repo(s): %s', ', '.join(targets))
            ret.extend(['--enablerepo={0}'.format(x) for x in targets])

    if disableexcludes:
        log.info('Disabling excludes for \'%s\'', disableexcludes)
        ret.append('--disableexcludes={0}'.format(disableexcludes))

    if branch:
        log.info('Adding branch \'%s\'', branch)
        ret.append('--branch={0}'.format(branch))

    for item in setopt:
        ret.extend(['--setopt', six.text_type(item)])

    if get_extra_options:
        # sorting here to make order uniform, makes unit testing more reliable
        for key in sorted(kwargs):
            if key.startswith('__'):
                continue
            value = kwargs[key]
            if isinstance(value, six.string_types):
                log.info('Found extra option --%s=%s', key, value)
                ret.append('--{0}={1}'.format(key, value))
            elif value is True:
                log.info('Found extra option --%s', key)
                ret.append('--{0}'.format(key))
        if ret:
            log.info('Adding extra options: %s', ret)

    return ret
345561
def ValidOptions(cls):
    """"""
    valid_options = []
    for obj_name in dir(cls):
      obj = getattr(cls, obj_name)
      if inspect.isclass(obj) and issubclass(obj, cls.OptionBase):
        valid_options.append(obj_name)
    return valid_options