def setActiveModule(Module): r"""Helps with collecting the members of the imported modules. """ module_name = Module.__name__ if module_name not in ModuleMembers: ModuleMembers[module_name] = [] ModulesQ.append(module_name) Group(Module, {}) # brand the module with __ec_member__ state.ActiveModuleMemberQ = ModuleMembers[module_name]
def processPendingModules(): r"""Processes the modules left unprocessed by the import hook. """ for name in ModulesQ[:]: processModule(name) ModulesQ.pop()
def resetActiveModuleToNext(): # Remove the module name from ModulesQ as it has been processed ModulesQ.pop() if ModulesQ: # Set the next module's Q the ActiveModuleMemberQ, so that the configured elements could be gathered for the right target state.ActiveModuleMemberQ = ModuleMembers[ModulesQ[-1]]