test/data/vclamp_jpk/README: Document sample versions
[hooke.git] / doc / generate-hooke-txt.py
old mode 100644 (file)
new mode 100755 (executable)
index 346db39..274afe4
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 #
-# Copyright (C) 2010 W. Trevor King <wking@drexel.edu>
+# Copyright (C) 2010-2012 W. Trevor King <wking@drexel.edu>
 #
 # This file is part of Hooke.
 #
@@ -121,7 +121,7 @@ class Tree(list):
     Serialize the tree with depth marking branches.
 
     >>> for depth,node in a.thread():
-    ...     print "%*s" % (2*depth+1, node.n)
+    ...     print('{}{}'.format(' '*2*depth, node.n))
     a
       b
         d
@@ -136,7 +136,7 @@ class Tree(list):
     branch splits.
 
     >>> for depth,node in a.thread(flatten=True):
-    ...     print "%*s" % (2*depth+1, node.n)
+    ...     print('{}{}'.format(' '*2*depth, node.n))
     a
       b
       d
@@ -333,5 +333,5 @@ def python_tree(root_path='hooke', root_modname='hooke'):
 if __name__ == '__main__':
     pt = python_tree(root_path='../hooke', root_modname='hooke')
     for node in pt.traverse():
-        print node.modname
+        print(node.modname)
         make_module_txt(node.modname, [c.modname for c in node])