actions.py 文件源码

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

项目:mistral-actions 作者: int32bit 项目源码 文件源码
def _extract_all_actions():
    path = os.path.dirname(mistral_actions.__file__)
    base_len = len(path[:-len(mistral_actions.__name__)])
    action_list = []
    for root, dirs, files in os.walk(path):
        for f in files:
            if f.endswith('.py') and not f.startswith('_'):
                module_name = (root + '/' + f)[base_len:-len('.py')].replace(
                    '/', '.')
                module = importutils.import_module(module_name)
                action_list.extend(_extract_actions_from_module(module))
    return action_list
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号