engine.py 文件源码

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

项目:og-miner 作者: opendns 项目源码 文件源码
def load_module(self, code_path):
        try:
            try:
                code_dir = os.path.dirname(code_path)
                code_file = os.path.basename(code_path)
                fin = open(code_path, 'rb')
                return  imp.load_source(md5.new(code_path).hexdigest(), code_path, fin)
            finally:
                try: fin.close()
                except: pass
        except ImportError, x:
            traceback.print_exc(file = sys.stderr)
            raise
        except:
            traceback.print_exc(file = sys.stderr)
            raise
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号