sacn_accout_system/server/cfg.py

16 lines
306 B
Python
Raw Permalink Normal View History

2024-08-17 11:25:51 +08:00
import tomllib
2024-08-25 21:23:24 +08:00
import os
2024-08-17 11:25:51 +08:00
2024-08-28 20:21:31 +08:00
2024-08-25 21:23:24 +08:00
with open("config/config.toml", "rb") as f:
2024-08-17 11:25:51 +08:00
config = tomllib.load(f)
2024-08-25 20:51:14 +08:00
2024-08-28 20:21:31 +08:00
with open(f"lang/{config["common"]["lang"]}.toml", "rb") as f:
lang = tomllib.load(f)
2024-08-25 20:51:14 +08:00
def reload():
global config
2024-08-25 21:23:24 +08:00
with open("config/config.toml", "rb") as f:
2024-08-25 20:51:14 +08:00
config = tomllib.load(f)