Skip to content
Snippets Groups Projects
Commit 6236aa24 authored by jacques.grelet_ird.fr's avatar jacques.grelet_ird.fr
Browse files

test read toml file

parent 34f354df
No related branches found
No related tags found
No related merge requests found
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]))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment