diff --git a/config.py b/config.py new file mode 100644 index 0000000000000000000000000000000000000000..721db0e405eea349252fa0834d371c1bb597441e --- /dev/null +++ b/config.py @@ -0,0 +1,19 @@ +import toml + +# some examples: +# https://www.programcreek.com/python/example/93872/toml.load +cfg = toml.load('cruise.toml') + +print(cfg['global']['author']) + +for key in cfg['cruise'].keys(): + print(cfg['cruise'][key]) + print(cfg['cruise'].get(key)) + +ctd = cfg['ctd'] +s = ctd['split'] +for key in s.keys(): + print("{}: {}".format(key, s[key])) +s = ctd['splitAll'] +for key in s.keys(): + print("{}: {}".format(key, s[key]))