def force_config(): r"""Forces the configuration of the members of the calling module. So that the configured members would be available for manipulation. Note: A call to this function will only be necessary when modifying an ec script witihin itself, as scripts are implicitly configured after their import. """ core.processModule(getCallingModule().__name__)
@arg(type=lambda p: abspath(p) if exists(dirname(path)) else throw('Error message.')) """ raise ValueError(message) def make_type(**Config): CT = CustomType(**Config) CT.__call__ = Config["func"] return CT # Main hooks.EcModuleName = __name__ FirstCaller = getCallingModule() def registerFirstCaller(): # Note: the FirstCaller should be registered separately as the import wouldn't be hooked yet. from modules import core core.setActiveModule(FirstCaller) def main(): from modules.hooks import isImportHooked, registerExitCall, hookIntoImport registerExitCall() if not isImportHooked(): hookIntoImport()
@arg(type=lambda p: abspath(p) if exists(dirname(path)) else throw('Error message.')) """ raise ValueError(message) def make_type(**Config): CT = CustomType(**Config) CT.__call__ = Config['func'] return CT # Main hooks.EcModuleName = __name__ FirstCaller = getCallingModule() def registerFirstCaller( ): # Note: the FirstCaller should be registered separately as the import wouldn't be hooked yet. from modules import core core.setActiveModule(FirstCaller) def main(): from modules.hooks import isImportHooked, registerExitCall, hookIntoImport registerExitCall() if not isImportHooked():