Category Code: loads fast, high readability, simple query modification
Analysis of standardized directory
1. The fixed path specification
2. settings.py profile
import os
BASEPATH = os.path.dirname(os.path.dirname(__file__))
A2_TXT_PATH = os.path.join(BASEPATH,'db','a2.txt')
BLACKLIST_PATH = os.path.join(BASEPATH,'db','blacklist')
User_PATH = os.path.join(BASEPATH,'db','user')
3. src.py main logic core logic file, common.py common component parts
from conf import setting
from lib import common
4. start.py startup file
import os
import sys
BASEPATH = os.path.dirname(os.path.dirname(__file__))
sys.path.append(BASEPATH)
from core.src import run
if __name__ == '__main__':
run()