def unset(self, args): config = utils.read_config() config.remove_option('core', args.property) utils.save_config(config)
def get(self, args): config = utils.read_config() if config.has_option('core', args.property): print(config.get('core', args.property))
def set_(self, args): config = utils.read_config() if not config.has_section('core'): config.add_section('core') config.set('core', args.property, args.value) utils.save_config(config)
def list_(self, args): config = utils.read_config() for section in config.sections(): print('[{}]'.format(section)) for k, v in list(config.items(section)): print('{} = {}'.format(k, v))