update config

This commit is contained in:
2025-12-08 18:08:43 +08:00
parent 988947aa1a
commit 66768cb359
2 changed files with 10 additions and 4 deletions
+6
View File
@@ -1,6 +1,7 @@
import configparser
from pathlib import Path
import sys
from typing import Any
miniQMTPath = r'D:\\Programs\\DTQMT\\userdata_mini' # miniQMT软件的安装路径
# miniQMTPath = ''
@@ -8,6 +9,8 @@ account_no:str = '99082560'
console_log = True
log_level = "INFO"
config : Any
def get_config_path() -> Path:
"""获取配置文件的正确路径(兼容开发环境和打包后的可执行文件)"""
if getattr(sys, 'frozen', False):
@@ -21,6 +24,9 @@ def get_config_path() -> Path:
return base_path / 'config.ini'
def get_config(section:str, key:str):
pass
def save_config(miniQmtPath:str, account_no:str):
"""创建默认配置文件"""
config = configparser.ConfigParser()