def _create_funq_ctx(self): ctx = {} self.funq = {} for k, v in self.__app_config__.iteritems(): ctx[k] = ApplicationContext(v) self.funq[k] = weakref.proxy(ctx[k].funq) return ctx
def __init__(self, executable, env=None, args=()): super(Application, self).__init__() cfg = ApplicationConfig(executable=executable, args=args, cwd=os.getcwd(), env=env, aliases=os.path.join(FUNQ_DIR, 'aliases'), global_options=GlobalOptions()) self._context = ApplicationContext(cfg)
def _create_funq_ctx(self): ctx = ApplicationContext(self.__app_config__) self.funq = weakref.proxy(ctx.funq) return ctx