1234567891011121314151617 |
- # -*- coding:utf-8 -*-
- import yaml
- def read_config():
- with open("config/env.yaml", "r", encoding="utf-8") as file:
- config = yaml.safe_load(file)
- return config
- address = "https://dcjxb.yunzhixue.cn" if read_config()['env'] == 'product' else "http://dcjxbtest.yunzhixue.cn"
- if __name__ == '__main__':
- import os
- os.chdir(r'C:\Users\86131\Desktop\demo\ai_qback')
- print(read_config()['env'])
|