#!/usr/bin/env python # coding=utf-8 # # Copyright © Splunk, Inc. All Rights Reserved. from __future__ import absolute_import, division, print_function, unicode_literals from collections import OrderedDict import sys from slim import program from slim.command import SlimArgumentParser from slim.utils import SlimLogger, encode_series, slim_configuration # Argument parser definition parser = SlimArgumentParser(description='get, set, or unset user or system options') parser.add_argument_help() # Command-specific arguments parser.add_argument( '-l', '--location', choices={'system', 'user'}, default=None, help=''' when writing settings: write to the named configuration file (default: user); when reading settings: read only from the named configuration file rather than from system and user ''', metavar='[system|user]') parser.add_argument( '-g', '--get', nargs='*', help=''' get the values for all settings (using *), all settings in a section (using
[.*]), or the named settings, where the name of each setting is its section and option name separated by a dot (
.