1. 程式人生 > >包的引入(base版本)

包的引入(base版本)

bsp pen color setting spa pri say pat nbsp

技術分享
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()

包的引入(base版本)