find.py 文件源码

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

项目:snakefood 作者: Shapeways 项目源码 文件源码
def get_ast_imports(ast):
    """
    Given an AST, return a list of module tuples for the imports found, in the
    form:
        (modname, remote-name, local-name, lineno, pragma)
    """
    assert ast is not None
    vis = ImportVisitor()
    compiler.walk(ast, vis, ImportWalker(vis))
    found_imports = vis.finalize()
    return found_imports


# **WARNING** This is where all the evil lies.  Risk and peril.  Watch out.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号