def init(dao, templates_dir): import db db.dao = dao templates.init(templates_dir) modutil.load_tree('devices') import worker # @UnusedImport
def load(roots=('views',)): if isinstance(roots, (list, tuple)): roots = {r: '' for r in roots} for root in roots: modutil.load_tree(root) for v in _pending_views: obj_path = _obj_to_path(v) path = _calc_path(roots, obj_path, v._specified_path) if path is not None: v.bind(path)
def start(queue, dao): from mqueue import db from mqueue.scheduler import SchedulerThread from mqueue.worker import WorkerThread init(queue) db.dao = dao modutil.load_tree('tasks') worker = WorkerThread() worker.start() scheduler = SchedulerThread() scheduler.start() _wait_for_exit() worker.stop() scheduler.stop()
def test_module(self): modutil.load_tree('decorated.util.modutil')
def test_package(self): modutil.load_tree('decorated')
def init(*packages): for package in packages: modutil.load_tree(package)
def init(*packages): global _ENABLED for p in packages: modutil.load_tree(p) _ENABLED = True