#!/usr/bin/env pythonprint(‘welcome to my atm‘)print(__file__)#相对路径import osimport sysprint(os.path.abspath(__file__))#绝对路径print(os.path.dirname(os.path.abspath(__file__)))#上级目录print(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))#上级目录BASE_DIR=os.path.dirname(os.path.dirname(os.path.abspath(__file__)))sys.path.append(BASE_DIR)#加入环境变量import conf,corefrom conf import settingfrom core import mainmain.login()
原文地址:https://www.cnblogs.com/rongye/p/9936835.html
时间: 2024-10-13 00:00:55