from pycallgraph2 import PyCallGraph from pycallgraph2.output import GraphvizOutput from pycallgraph2 import Config from pycallgraph2 import GlobbingFilter def main(): # TODO: 调用各种类、函数 return if __name__ == "__main__": graphviz = GraphvizOutput() graphviz.output_file = 'graph.png' with PyCallGraph(output=graphviz): main()