psyGen.py 文件源码

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

项目:PSyclone 作者: stfc 项目源码 文件源码
def dag(self, file_name='dag', file_format='svg'):
        '''Create a dag of this node and its children'''
        try:
            import graphviz as gv
        except ImportError:
            # todo: add a warning to a log file here
            # silently return if graphviz bindings are not installed
            return
        try:
            graph = gv.Digraph(format=file_format)
        except ValueError:
            raise GenerationError(
                "unsupported graphviz file format '{0}' provided".
                format(file_format))
        self.dag_gen(graph)
        graph.render(filename=file_name)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号