Mercurial > hg > silvermirror
changeset 47:4d950a47f96b
stub ini2dict martINI replacement
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Fri, 13 Aug 2021 15:01:39 -0700 |
parents | b19b605b5b29 |
children | 8fbf968e8dea |
files | silvermirror/unify.py |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/silvermirror/unify.py Fri Aug 13 14:55:38 2021 -0700 +++ b/silvermirror/unify.py Fri Aug 13 15:01:39 2021 -0700 @@ -5,6 +5,7 @@ """ import argparse +import configparser import getpass import json import os @@ -23,10 +24,17 @@ raise NotImplementedError('Need to specify a config file, like\n~/.silvermirror') +def ini2dict(filename): + config = configparser.ConfigParser() + config.read(filename) + for section in config.sections(): + raise NotImplementedError('TODO') + def read_config(filename): """read configuration `filename`""" - config = ConfigMunger(filename).dict() + # config = ConfigMunger(filename).dict() + config = ini2dict(filename) ### main configuration main = config.pop('::SilverMirror::', {})