13 lines
309 B
Python
13 lines
309 B
Python
![]() |
'''Configuration module'''
|
||
|
from configparser import ConfigParser as Config
|
||
|
|
||
|
|
||
|
def read_config(file_name: str) -> Config:
|
||
|
'''Read config from a file'''
|
||
|
config_file = open(file_name, 'r', encoding='utf8')
|
||
|
|
||
|
config = Config()
|
||
|
config.read_file(config_file)
|
||
|
config_file.close()
|
||
|
return config
|