import osimport json#获取配置path os.getcwd() os.sep config.jsonconf Nonewith open(path, r, encodingutf-8) as f:if conf is None:conf json.loads(f.read())heard {_token: f{conf[token]}}