Created
May 31, 2021 13:56
-
-
Save lazyoracle/93a29b63c0ba16161ba4023a8b922695 to your computer and use it in GitHub Desktop.
Creating static call graphs in Python using pyan3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install -U pyan3==1.1.1 | |
pyan3 <path/to/file> --uses --no-defines --colored --grouped --annotated --dot > call-graph.dot | |
pip install graphviz | |
python | |
>>> from graphviz import render | |
>>> render('dot', 'png', 'call-graph.dot') | |
'call-graph.dot.png' | |
>>> render('dot', 'svg', 'call-graph.dot') | |
'call-graph.dot.svg' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment