mapgen_rivers/settings.py
2020-07-21 14:12:20 +02:00

12 lines
292 B
Python

def read_config_file(fname):
settings = {}
with open(fname, 'r') as f:
for line in f:
slist = line.split('=', 1)
if len(slist) >= 2:
prefix, suffix = slist
settings[prefix.strip()] = suffix.strip()
return settings