Show configuration variables
426860
def configuration(ctx):
    
    t = [["Key", "Value"]]
    for key in ctx.bitshares.config:
        t.append([key, ctx.bitshares.config[key]])
    print_table(t)
1180941
function config(options) {
    var current = config.current
    Object.assign(current, options)
    api._init(current)
}
281004
def config_conf(obj):
    ""
    # If we ever want to add some default options this is where to do that
    cfg = {}
    for name in dir(obj):
        if name in CONFIG_PARSER_CFG: # argument of ConfigParser
            cfg[name] = getattr(obj, name)
    return cfg
323140
private int showConfig(String cmd, String argv[], int startindex)
      throws IOException {
    int exitCode = 0;
    PolicyInfo[] all = raidnode.getAllPolicies();
    for (PolicyInfo p: all) {
      out.println(p);
    }
    return exitCode;
  }
104777
def load_config(self):
        "

        self.settings.general.triggerOnChangedValue(self.settings.general, 'use-trayicon')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'prompt-on-quit')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'prompt-on-close-tab')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'window-tabbar')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'mouse-display')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'display-n')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'window-ontop')
        if not FullscreenManager(self.settings, self.window).is_fullscreen():
            self.settings.general.triggerOnChangedValue(self.settings.general, 'window-height')
            self.settings.general.triggerOnChangedValue(self.settings.general, 'window-width')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'use-scrollbar')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'history-size')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'infinite-history')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'use-vte-titles')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'set-window-title')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'abbreviate-tab-names')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'max-tab-name-length')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'quick-open-enable')
        self.settings.general.triggerOnChangedValue(
            self.settings.general, 'quick-open-command-line'
        )
        self.settings.style.triggerOnChangedValue(self.settings.style, 'cursor-shape')
        self.settings.styleFont.triggerOnChangedValue(self.settings.styleFont, 'style')
        self.settings.styleFont.triggerOnChangedValue(self.settings.styleFont, 'palette')
        self.settings.styleFont.triggerOnChangedValue(self.settings.styleFont, 'palette-name')
        self.settings.styleFont.triggerOnChangedValue(self.settings.styleFont, 'allow-bold')
        self.settings.styleBackground.triggerOnChangedValue(
            self.settings.styleBackground, 'transparency'
        )
        self.settings.general.triggerOnChangedValue(self.settings.general, 'use-default-font')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'compat-backspace')
        self.settings.general.triggerOnChangedValue(self.settings.general, 'compat-delete')
903608
@TaskAction
  public void showConfiguration() throws IllegalAccessException {
    Object extensionInstance = getProject().getExtensions().getByName(extensionId);
    getLogger().lifecycle(getExtensionData(extensionId, extensionInstance, 0));
  }
689767
def load_configuration():
    """"""

    (belbio_conf_fp, belbio_secrets_fp) = get_belbio_conf_files()
    log.info(f"Using conf: {belbio_conf_fp} and secrets files: {belbio_secrets_fp} ")

    config = {}
    if belbio_conf_fp:
        with open(belbio_conf_fp, "r") as f:
            config = yaml.load(f, Loader=yaml.SafeLoader)
            config["source_files"] = {}
            config["source_files"]["conf"] = belbio_conf_fp

    if belbio_secrets_fp:
        with open(belbio_secrets_fp, "r") as f:
            secrets = yaml.load(f, Loader=yaml.SafeLoader)
            config["secrets"] = copy.deepcopy(secrets)
            if "source_files" in config:
                config["source_files"]["secrets"] = belbio_secrets_fp

    get_versions(config)

    # TODO - needs to be completed
    # add_environment_vars(config)

    return config
671339
def log(self):
        """"""
        log.info('PyPhi v%s', __about__.__version__)
        if self._loaded_files:
            log.info('Loaded configuration from %s', self._loaded_files)
        else:
            log.info('Using default configuration (no configuration file '
                     'provided)')
        log.info('Current PyPhi configuration:\n %s', str(self))
182102
def get_config(self, retrieve="all"):
        """"""
        get_startup = retrieve == "all" or retrieve == "startup"
        get_running = retrieve == "all" or retrieve == "running"
        get_candidate = retrieve == "all" or retrieve == "candidate"

        if retrieve == "all" or get_running:
            result = self._execute_command_with_vdom('show')
            text_result = '\n'.join(result)

            return {
                'startup': u"",
                'running': py23_compat.text_type(text_result),
                'candidate': u"",
            }

        elif get_startup or get_candidate:
            return {
                'startup': u"",
                'running': u"",
                'candidate': u"",
            }
1202651
def __prepare_config(config, project_mapping, session_variables_set=None):
    
    # get config variables
    raw_config_variables = config.pop("variables", {})
    raw_config_variables_mapping = utils.ensure_mapping_format(raw_config_variables)
    override_variables = utils.deepcopy_dict(project_mapping.get("variables", {}))
    functions = project_mapping.get("functions", {})

    # override config variables with passed in variables
    raw_config_variables_mapping.update(override_variables)

    if raw_config_variables_mapping:
        config["variables"] = raw_config_variables_mapping

    check_variables_set = set(raw_config_variables_mapping.keys())
    check_variables_set |= (session_variables_set or set())
    prepared_config = prepare_lazy_data(config, functions, check_variables_set, cached=True)
    return prepared_config
753503
public function showVars()
    {
        $what = $this->getParameter('scope');
        switch ( $what ) {
            case 'global':
            case 'globals':
            case 'system':
            case 'systems':
                $debug = $this->getGlobals();
                break;

            default:
                $debug = $this->getLocals();
                break;
        }

        return '<pre>' . JSONUtils::encode($debug, true, false) . '</pre>';
    }
1256227
def do_list():
    
    dirs =  os.walk(CONFIG_ROOT).next()[1]
    if dirs:
        print "List of available configurations:\n"
        for d in dirs:
            print "  * {}".format(d)
    else:
        print "No configurations available."
519678
def _is_already_configured(configuration_details):
    """"""
    path = Path(configuration_details.path).expanduser()
    with path.open('r') as shell_config:
        return configuration_details.content in shell_config.read()
892261
def show(config_file=False):
    '''
    
    '''
    roots = (
        'compat',
        'debug',
        'dev',
        'hptmv',
        'hw',
        'kern',
        'machdep',
        'net',
        'p1003_1b',
        'security',
        'user',
        'vfs',
        'vm'
    )
    cmd = 'sysctl -ae'
    ret = {}
    comps = ['']

    if config_file:
        # If the file doesn't exist, return an empty list
        if not os.path.exists(config_file):
            return []

        try:
            with salt.utils.files.fopen(config_file, 'r') as f:
                for line in f.readlines():
                    l = line.strip()
                    if l != "" and not l.startswith("#"):
                        comps = line.split('=', 1)
                        ret[comps[0]] = comps[1]
            return ret
        except (OSError, IOError):
            log.error('Could not open sysctl config file')
            return None
    else:
        out = __salt__['cmd.run'](cmd, output_loglevel='trace')
        for line in out.splitlines():
            if any([line.startswith('{0}.'.format(root)) for root in roots]):
                comps = line.split('=', 1)
                ret[comps[0]] = comps[1]
            elif comps[0]:
                ret[comps[0]] += '{0}\n'.format(line)
            else:
                continue
        return ret
1134410
def showConfig( self ):
        
        item = self.uiPluginTREE.currentItem()
        if not isinstance(item, PluginItem):
            return
        
        plugin = item.plugin()
        widget = self.findChild(QWidget, plugin.uniqueName())
        
        if ( not widget ):
            widget = plugin.createWidget(self)
            widget.setObjectName(plugin.uniqueName())
            self.uiConfigSTACK.addWidget(widget)
            
        self.uiConfigSTACK.setCurrentWidget(widget)
176152
def config_content(self, command, vars):
        
        settable_vars = [
                var('db_url', 'Database url for sqlite, postgres or mysql', 
                    default='sqlite:///%(here)s/studio.db'),
                var('ms_url','Url to the mapserv CGI',
                    default='http://localhost/cgi-bin/mapserv'),
                var('admin_password','Password for default admin user',
                    default=secret.secret_string(length=8))
        ]

        for svar in settable_vars:
            if command.interactive:
                prompt = 'Enter %s' % svar.full_description()
                response = command.challenge(prompt, svar.default, svar.should_echo)
                vars[svar.name] = response
            else:
                if not vars.has_key(svar.name):
                    vars[svar.name] = svar.default

        vars['cookie_secret'] = secret.secret_string()

        # call default pylons install
        return super(StudioInstaller, self).config_content(command, vars)
140973
def configurations(self):
        """"""

        if self._confs is not None:
            return self._confs

        with output_capturing():
            module = self.load(self.fpath)
            confs = getattr(module, CONFIGS_MODULE_ATTR)
            confs = listify(confs)

        self._confs = confs

        return confs