import argparse import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../') from configparser import ConfigParser import json #from testing.get_model import get_all_model """parser = argparse.ArgumentParser(description='load env') parser.add_argument('--profile', default='dev', type=str, help='profile information') args = parser.parse_args() profile = args.profile""" ws_cfg = ConfigParser() ws_cfg.read(os.path.dirname(os.path.abspath(__file__)) + '/app-qa.properties') """if profile == 'qa': ws_cfg.read(os.path.dirname(os.path.abspath(__file__)) + '/app-qa.properties') else: ws_cfg.read((os.path.dirname(os.path.abspath(__file__)) + '/app-dev.properties'))""" # global var MYSQL_SERVER = str(ws_cfg.get('conf', 'MYSQL_SERVER')) AI_PATH_PREFIX = str(ws_cfg.get('conf', 'AI_PATH_PREFIX')) HTTP_SERVER_PREFIX = str(ws_cfg.get('conf', 'HTTP_SERVER_PREFIX'))