diff options
Diffstat (limited to 'prettyson')
-rwxr-xr-x | prettyson | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -1,6 +1,8 @@ -#!/usr/bin/python +#!/usr/bin/python3 + +import json +import sys -import sys, json def inputs(args): if args: @@ -8,10 +10,11 @@ def inputs(args): with open(filename) as f: yield filename, f else: - yield '-', sys.stdin + yield "-", sys.stdin + objs = [] for filename, f in inputs(sys.argv[1:]): objs.append(json.load(f)) json.dump(objs, sys.stdout, indent=4) -sys.stdout.write('\n') +sys.stdout.write("\n") |