包的引入(base版本)


1
#author F 2 3 import os 4 import sys 5 print(__file__) #相对路径 6 print(os.path.abspath(__file__)) #绝对路径 7 print(os.path.dirname(os.path.abspath(__file__))) 8 print(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 9 BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 10 11 sys.path.append(BASE_PATH) 12 from conf import settings 13 from core import main 14 main.sayHello()

 

posted @ 2017-06-20 16:40  Bird_getUpEarly  阅读(174)  评论(0编辑  收藏  举报