Created
December 8, 2022 07:29
-
-
Save coseos/da3b0b981d5d7af32529c32652048f37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import sys | |
import json | |
def print_json(file_path): | |
with open(file=file_path, mode='r') as read_file: | |
object = json.load(read_file) | |
pretty_object = json.dumps(object, indent=4) | |
print(pretty_object) | |
if __name__ == "__main__": | |
for i, arg in enumerate(sys.argv): | |
if i > 0: | |
print_json(arg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment