symd.py 文件源码

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

项目:symd 作者: xym-tool 项目源码 文件源码
def print_impacting_modules(single_node=None):
    """
    For each module, print a list of modules that the module is depending on,
    i.e. modules whose change can potentially impact the module. The function
    shows all levels of dependency, not just the immediately imported
    modules.
    :return:
    """
    print('\n===Impacting Modules===')
    for node_name in G.nodes_iter():
        if single_node and (node_name!=single_node):
            continue
        descendants = nx.descendants(G, node_name)
        print(augment_format_string(node_name, '\n%s:') % node_name)
        for d in descendants:
            print(augment_format_string(d, '    %s') % d)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号