changeset 81:7333e5dead5a

to_dot in Graph now has standard out as default.
author Janus Dam Nielsen <janus.nielsen@alexandra.dk>
date Fri, 29 May 2009 10:59:23 +0200
parents d3456f9174f5
children a007c3619ecc
files pysmcl/graph.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/graph.py	Fri May 29 10:53:33 2009 +0200
+++ b/pysmcl/graph.py	Fri May 29 10:59:23 2009 +0200
@@ -1,4 +1,6 @@
 
+# Import library packages.
+import sys
 
 class Node:
     count = 0
@@ -15,7 +17,7 @@
     def __init__(self, entry):
         self.entry = entry
 
-    def to_dot(self, output):
+    def to_dot(self, output=sys.stdout):
         taken = set()
         print >>output, "digraph G {"
         print >>output, "  in -> %s" % self.entry.nr