read_idl_params_file
- PlasmaCalcs.tools.io_tools.read_idl_params_file(filename, *, eval=True, as_tuples=False)
parse idl file of params into a python dictionary of params.
filename: string
file to read from.eval: bool, default Truewhether to attempt to evaluate the values,using ast.literal_eval (safer but less flexible than eval).if True, try to evaluate values but use strings if evaluation fails.if False, values will remain as strings.as_tuples: bool, default Falseif True, return list of tuples instead of dictionary.list of tuples guaranteed to appear in the same order as in the idl file.File formatting notes:- semicolons (;) are used for comments. (idl format)- ignore blank lines & lines that don’t assign a variable (missing ‘=’)- ignores all leading & trailing whitespace in vars & values.