parameters: (filename, appdir=App_dir, user="", server="", required=False)
docstring: 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
docstring_summary: 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
docstring_tokens: 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
function: 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
function_tokens: 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