This commit is contained in:
2025-11-14 15:52:03 +08:00
parent a18c7be7eb
commit cd67c9ad60
6 changed files with 23 additions and 18 deletions
+3 -1
View File
@@ -7,6 +7,7 @@ miniQMTPath = r'D:\\Programs\\DTQMT\\userdata_mini' # miniQMT软件的安装路
# miniQMTPath = ''
account_no:str = '99082560'
console_log = True
log_level = "INFO"
def get_config_path() -> Path:
"""获取配置文件的正确路径(兼容开发环境和打包后的可执行文件)"""
@@ -26,7 +27,8 @@ def create_default_config():
config = configparser.ConfigParser()
config['config'] = {
'miniQMTPath': r'D:/Programs/QMT/userdata_mini',
'account_no': '00000000'
'account_no': '00000000',
'log_level' : 'INFO'
}
config_path = get_config_path()
with open(config_path, 'w') as configfile: