import os
print(__file__) # 当前文件路径
print(os.path.dirname(__file__)) # 上一层目录
# 1 工程路径
project_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# 2 配置路径
config_path = os.path.jion(project_path,'configs')
#3 数据路径
data_path = os.path.jion(project_path,'configs')
# report_path = os.path.join(project_path,r'outFies\report\tmp')
网友评论