test/data/vclamp_jpk/README: Document sample versions
[hooke.git] / doc / generate-hooke-txt.py
old mode 100644 (file)
new mode 100755 (executable)
index 653c1a6..274afe4
@@ -1,6 +1,22 @@
 #!/usr/bin/python
 #
-# COPYRIGHT
+# Copyright (C) 2010-2012 W. Trevor King <wking@drexel.edu>
+#
+# This file is part of Hooke.
+#
+# Hooke is free software: you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# Hooke is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
+# Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Hooke.  If not, see
+# <http://www.gnu.org/licenses/>.
 
 """Auto-generate reStructuredText of the hooke module tree for Sphinx.
 
@@ -105,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
@@ -120,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
@@ -317,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])