X-Git-Url: http://git.tremily.us/?p=hooke.git;a=blobdiff_plain;f=doc%2Fgenerate-hooke-txt.py;h=274afe470dafbd1e10373e51f551fed354844df7;hp=29dadbeec423b0260be384cd4291e8f1c682da94;hb=60b12a779acf92ec32ef2d0ed9e5766b11705150;hpb=01c8dd10d343718246c48dc2f4c122d59913de4d diff --git a/doc/generate-hooke-txt.py b/doc/generate-hooke-txt.py old mode 100644 new mode 100755 index 29dadbe..274afe4 --- a/doc/generate-hooke-txt.py +++ b/doc/generate-hooke-txt.py @@ -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])