manager.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:qudi 作者: Ulm-IQO 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号