# -*- coding: utf-8 -*-
"""
Convenience script to pretty print a JSON file to "json_prettyprint.txt".
Pass the file to load as the first argument to the script.
"""
import json, sys

def main(argv):
    with open(argv[1], 'r') as fin:
        obj = json.load(fin)
        with open('json_prettyprint.txt', 'w') as fout:
            json.dump(obj, fout, indent=2)

if __name__ == "__main__":
    main(sys.argv)