"""Read and write configuration settings """ from milc import cli def print_config(section, key): """Print a single config setting to stdout. """ cli.echo('%s.%s{fg_cyan}={fg_reset}%s', section, key, cli.config[section][key]) def show_config(): """Print the current configuration to stdout. """ for section in cli.config: for key in cli.config[section]: print_config(section, key) def parse_config_token(config_token): """Split a user-supplied configuration-token into its components. """ section = option = value = None if '=' in config_token and '.' not in config_token: cli.log.error('Invalid configuration token, the key must be of the form
.