20140424-2 软件目录结构规范2

atm.py
import os,sys

print(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)

from conf import settings
from core import main

main.logs()
print(__file__)
main.py
def logs():
    print("Login in ")
注:1.软件目录结构规范
       2.获取路劲,添加系统变量


 
 

猜你喜欢

转载自blog.csdn.net/weixin_42020378/article/details/80070808