The typical ConfigParser generated file looks like:
[Section] bar=foo [Section 2] bar2= baz
Now, is there a way to index lists like, for in
This is what I use for lists:
config file content:
[sect] alist = a b c
code :
l = config.get('sect', 'alist').split('\n')
it work for strings
in case of numbers
config content:
nlist = 1 2 3
code:
nl = config.get('sect', 'alist').split('\n') l = [int(nl) for x in nl]
thanks.