Skip to content

Instantly share code, notes, and snippets.

@washt
washt / pp
Created March 1, 2017 19:56 — forked from thiagophx/pp
JSON Pretty Print Stream
#!/usr/bin/python -u
import sys, json
from pygments import highlight
from pygments.lexers import JsonLexer
from pygments.formatters import Terminal256Formatter
while True:
line = sys.stdin.readline()
if line.strip():