You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
412 B

import configparser
import os
def getConfig():
config = configparser.ConfigParser()
if os.path.exists('./Config.ini'):
config.read('./Config.ini', encoding='utf-8')
if os.path.exists('../Config.ini'):
config.read('../Config.ini', encoding='utf-8')
if os.path.exists('../../Config.ini'):
config.read('../../Config.ini', encoding='utf-8')
return config