graphgen.py 453 B

12345678910111213141516
  1. import graphviz
  2. import pyan
  3. from utils import fileio
  4. # root_dir1 = "/Users/liufan/program/PYTHON/SAP/PrivacyScan/systementrance.py"
  5. # root_dir2 = "/Users/liufan/program/PYTHON/SAP/PrivacyScan/utils/fileio.py"
  6. # root_list = [root_dir2, root_dir1]
  7. source_dir = "/Users/liufan/program/PYTHON/SAP/PrivacyScan"
  8. file_list = fileio.walk_files_path(source_dir)
  9. res = pyan.create_callgraph(file_list, format="dot")
  10. graph = graphviz.Source(res)
  11. graph.view()