def importModule(self, baseName, module):
"""Load a python module that is a loadable Qudi module.
@param string baseName: the module base package (hardware, logic, or gui)
@param string module: the python module name inside the base package
@return object: the loaded python module
"""
logger.info('Loading module ".{0}.{1}"'.format(baseName, module))
if not isBase(baseName):
raise Exception('You are trying to cheat the '
'system with some category {0}'.format(baseName))
# load the python module
mod = importlib.__import__('{0}.{1}'.format(
baseName, module), fromlist=['*'])
# print('refcnt:', sys.getrefcount(mod))
return mod
评论列表
文章目录