Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed for python 3

  • Loading branch information...
commit ef08c118f0b99245a0ce69a17be4d3fe025694f5 1 parent 43ee79e
@adisbladis adisbladis authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 pjson
View
7 pjson
@@ -21,7 +21,8 @@ Author: Igor Guerrero <igfgt1@gmail.com>, 2012
import json
import sys
-from StringIO import StringIO
+try: from StringIO import StringIO
+except ImportError: from io import StringIO
from pygments import highlight
from pygments.formatters import TerminalFormatter
from pygments.lexers import JSONLexer
@@ -47,7 +48,7 @@ if __name__ == '__main__':
for line in sys.stdin:
code = format_json_code(line)
if sys.stdout.isatty():
- print color_yo_shit(code)
+ print(color_yo_shit(code))
else:
- print code
+ print(code)
Please sign in to comment.
Something went wrong with that request. Please try again.