Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fmt newlines

  • Loading branch information...
commit f0dfd9681deb9718bcf4dbcb75e8fe5a77799cd9 1 parent a9805ae
Lorenzo Bolla authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 logkeys/logkeys.py
View
8 logkeys/logkeys.py
@@ -16,8 +16,14 @@ def parse(inp=sys.stdin):
def print_count(count):
+
+ def fmt(k):
+ if k == '\n':
+ return '<NEWLINE>'
+ return k
+
for v, k in sorted(((v, k) for k, v in count.iteritems()), reverse=True):
- print '%+10s %d' % (k, v)
+ print '%+10s %d' % (fmt(k), v)
def main():
Please sign in to comment.
Something went wrong with that request. Please try again.