(filename, appdir=App_dir, user="", server="", required=False)
Read parameter text/dict and return it.
    Return None on error, or ""/{} if file not required and does not exist.
    For filenames ending in .json, JSON conversion is applied
Read parameter text/dict and return it.
    Return None on error, or ""/{} if file not required and does not exist.
    For filenames ending in .json, JSON conversion is applied
Read parameter text / dict and return it . Return None on error or / {} if file not required and does not exist . For filenames ending in . json JSON conversion is applied
def read_param_file(filename, appdir=App_dir, user="", server="", required=False):
    """Read parameter text/dict and return it.
    Return None on error, or ""/{} if file not required and does not exist.
    For filenames ending in .json, JSON conversion is applied
    """
    filepath = get_param_filepath(filename, appdir=appdir, user=user, server=server)
    if not required and not os.path.exists(filepath):
        return {} if filename.endswith(".json") else ""
    try:
        with open(filepath) as f:
            text = f.read()
            return json.loads(text) if filename.endswith(".json") else text
    except Exception as excp:
        logging.error("Error in reading file %s: %s", filepath, excp)
        return None
def read_param_file ( filename , appdir = App_dir , user = "" , server = "" , required = False ) : filepath = get_param_filepath ( filename , appdir = appdir , user = user , server = server ) if not required and not os . path . exists ( filepath ) : return { } if filename . endswith ( ".json" ) else "" try : with open ( filepath ) as f : text = f . read ( ) return json . loads ( text ) if filename . endswith ( ".json" ) else text except Exception as excp : logging . error ( "Error in reading file %s: %s" , filepath , excp ) return None