#! /usr/bin/python # # json_read.py # # Jan/14/2025 # # ------------------------------------------------------------------ import sys import os import json # sys.path.append('/var/www/data_base/common/python_common') from text_manipulate import dict_display_proc # # ------------------------------------------------------------------ sys.stderr.write("*** 開始 ***\n") # file_in = sys.argv[1] sys.stderr.write(file_in + "\n") # dict_aa = {} if os.path.exists(file_in): try: with open(file_in) as ff: dict_aa = json.load(ff) except Exception as ee: sys.stderr.write("*** error *** in json.load ***\n") sys.stderr.write(str(ee) + "\n") # dict_display_proc(dict_aa) else: sys.stderr.write("*** error *** %s doesn't exist ***\n" % file_in) # sys.stderr.write("*** 終了 ***\n") # ------------------------------------------------------------------