Commit c70d987a by 岳巧源

modify project structure

parent c1c261f2
import json
def load_config() -> dict:
with open('config.json', 'r', encoding='UTF-8') as f:
return json.load(f)
import config
if __name__ == '__main__':
conf = config.load_config()
import os.path
def load_config() -> str:
current_path = os.path.abspath(__file__)
dir_path = os.path.dirname(current_path)
config_path = os.path.join(os.path.dirname(dir_path), "config.json")
return config_path
CONFIG_PATH = load_config()
__all__ = [
"CONFIG_PATH"
]
import os.path
import sys
current_path = os.path.abspath(__file__)
current_dir = os.path.dirname(current_path)
root_dir = os.path.dirname(current_dir)
sys.path.append(root_dir)
from utils import load_json
if __name__ == '__main__':
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment