mirror of
https://gitlab.com/gaelysam/mapgen_rivers.git
synced 2024-11-13 06:10:21 +01:00
12 lines
292 B
Python
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
|