python文件路径切换 获取相对路径方法:先获取当前路径—返回上级目录—目录加前缀 import os BASE_PATH_3 = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))