[Add] load global setting from json file

This commit is contained in:
vn.py 2019-02-18 13:09:19 +08:00
parent 37f2a0c9b6
commit d32c3100af

View File

@ -4,6 +4,8 @@ Global setting of VN Trader.
from logging import CRITICAL
from .utility import load_json
SETTINGS = {
"font.family": "Arial",
"font.size": 12,
@ -19,4 +21,12 @@ SETTINGS = {
"email.password": "",
"email.sender": "",
"email.receiver": "",
"rqdata.username": "",
"rqdata.password": ""
}
# Load global setting from json file.
SETTING_FILENAME = "vt_setting.json"
SETTINGS.update(load_json(SETTING_FILENAME))