1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#!/usr/bin/env python
"""
This example is trying to make a large graph. You'll need some internet access
for this to work.
"""
from pycallgraph2 import PyCallGraph
from pycallgraph2 import Config
from pycallgraph2.output import GraphvizOutput
def main():
graphviz = GraphvizOutput()
graphviz.output_file = 'large.png'
config = Config(include_stdlib=True)
with PyCallGraph(output=graphviz, config=config):
from urllib3 import urlopen
from xml.dom.minidom import parseString
parseString(urlopen('http://w3.org/').read())
if __name__ == '__main__':
main()
|