<s> import json <EOL> import os <EOL> import sys <EOL> PARENT_DIR = os . path . dirname ( os . path . dirname ( os . path . realpath ( __file__ ) ) ) <EOL> BASE_DIR = os . path . dirname ( PARENT_DIR ) <EOL> sys . path . append ( os . path . join ( BASE_DIR , "<STR_LIT>" , "<STR_LIT>" ) ) <EOL> import phlsys_fs <EOL> while True : <EOL> with phlsys_fs . read_file_lock_context ( '<STR_LIT>' ) as f : <EOL> text = f . read ( ) <EOL> data = { } <EOL> if text : <EOL> try : <EOL> data = json . loads ( text ) <EOL> except Exception as e : <EOL> print ( e ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( text ) <EOL> print ( "<STR_LIT>" ) <EOL> raise <EOL> print ( "<STR_LIT>" , len ( data ) , "<STR_LIT>" ) </s>
