X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=funcparserlib%2Futil.py;h=6c8ea4a10c7279b8a2b1fe8de32010581b7bb1b4;hb=0cb66411aad82f7bf9fa20e4942be9bacefcfa86;hp=8a510bd2fe41aefce58dc6e422c8704794b89fa8;hpb=1f0bf65417613b1cb3a5bfd744750e1e823c8622;p=kiibohd-kll.git diff --git a/funcparserlib/util.py b/funcparserlib/util.py index 8a510bd..6c8ea4a 100644 --- a/funcparserlib/util.py +++ b/funcparserlib/util.py @@ -28,7 +28,7 @@ def pretty_tree(x, kids, show): Returns a pseudographic tree representation of x similar to the tree command in Unix. """ - (MID, END, CONT, LAST, ROOT) = (u'|-- ', u'`-- ', u'| ', u' ', u'') + (MID, END, CONT, LAST, ROOT) = ('|-- ', '`-- ', '| ', ' ', '') def rec(x, indent, sym): line = indent + sym + show(x) @@ -44,6 +44,6 @@ def pretty_tree(x, kids, show): next_indent = indent + LAST syms = [MID] * (len(xs) - 1) + [END] lines = [rec(x, next_indent, sym) for x, sym in zip(xs, syms)] - return u'\n'.join([line] + lines) + return '\n'.join([line] + lines) - return rec(x, u'', ROOT) + return rec(x, '', ROOT)