diff options
author | ysitu <ysitu@users.noreply.github.com> | 2014-06-25 19:27:08 -0400 |
---|---|---|
committer | ysitu <ysitu@users.noreply.github.com> | 2014-07-15 15:29:28 -0400 |
commit | a3bc59fcb27e1fc0590454cbb0abf0cb38e8984d (patch) | |
tree | 100768574d13311f542ea4aaaa273197104b2813 /examples/drawing/lanl_routes.py | |
parent | cf6ce260f7b2025fc048d076b88e98bb4ca2beee (diff) | |
download | networkx-a3bc59fcb27e1fc0590454cbb0abf0cb38e8984d.tar.gz |
Adapt print statements in examples for Python 3 compatibility
Diffstat (limited to 'examples/drawing/lanl_routes.py')
-rw-r--r-- | examples/drawing/lanl_routes.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/drawing/lanl_routes.py b/examples/drawing/lanl_routes.py index ec07491a..11903fa6 100644 --- a/examples/drawing/lanl_routes.py +++ b/examples/drawing/lanl_routes.py @@ -21,7 +21,7 @@ def lanl_graph(): try: fh=open('lanl_routes.edgelist','r') except IOError: - print "lanl.edges not found" + print("lanl.edges not found") raise G=nx.Graph() @@ -52,9 +52,9 @@ if __name__ == '__main__': G=lanl_graph() - print "graph has %d nodes with %d edges"\ - %(nx.number_of_nodes(G),nx.number_of_edges(G)) - print nx.number_connected_components(G),"connected components" + print("graph has %d nodes with %d edges"\ + %(nx.number_of_nodes(G),nx.number_of_edges(G))) + print(nx.number_connected_components(G),"connected components") import matplotlib.pyplot as plt plt.figure(figsize=(8,8)) |