This module let users visualize recursive calls. Inputs and outputs are properly shown in the call graph.
It is a based on carlsborg's rcviz module.
It should work with Jupyter notebooks.
Python's graphviz module needs to be installed first.
from rcviz import viz
@viz()
def count_items(L):
if len(L)==0:
return 0
L.pop(0)
return 1 + count_items(L)
count_items(['a','b','c'])
viz.render()
In a Jupyter notebook, the call graph is shown in line.
In a Python program, the picture is saved to callgraph.png.