How to use the pydeps.dot.call_graphviz_dot function in pydeps

To help you get started, we’ve selected a few pydeps examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thebjorn / pydeps / pydeps / pydeps.py View on Github external
dep_graph = py2depgraph.py2dep(trgt, **kw)

    if kw.get('show_deps'):
        cli.verbose("DEPS:")
        pprint.pprint(dep_graph)

    dotsrc = depgraph_to_dotsrc(trgt, dep_graph, **kw)

    if not nodot:
        if kw.get('show_dot'):
            cli.verbose("DOTSRC:")
            print(dotsrc)

        if not no_output:
            svg = dot.call_graphviz_dot(dotsrc, fmt)
            if fmt == 'svg':
                svg = svg.replace(b'', b'<style>.edge>path:hover{stroke-width:8}</style>')

            with open(output, 'wb') as fp:
                cli.verbose("Writing output to:", output)
                fp.write(svg)

            if show_svg:
                dot.display_svg(kw, output)