import sys import importlib sys.path.append('../module-py') methods = importlib.import_module(f"xlib") class Global(object): # --- 中间件服务器 --- mdb = importlib.import_module(f"xclient.xmongo").Client(host='192.168.131.23', port=7030, database='hs', username='admin', password='admin') mq01 = importlib.import_module(f"xclient.xmqtt").Client(host='192.168.131.23', port=41883) mq02 = importlib.import_module(f"xclient.xmqtt").Client(host='192.168.131.23', port=41883) # --- 插件 --- aps = importlib.import_module(f"xpip.xapscheduler").APS(db_type='mongo', db_host='192.168.131.23', db_port=7030, username='admin', password='admin', database='hs', collection='LoopTask')