I've been given a Python code, together with the modules it imports. I would like to build a tree indicating which function calls what other functions. How can I do that?
Building a call tree for a Python code
5.6k Views Asked by DeltaIV At
2
you can use the
ast
(abstract syntax tree) module from the python standard libraryparsing the file using
ast.parse
:outputs: