PlasmaCalcs.tools.io_tools.updated_idl_params_file
- PlasmaCalcs.tools.io_tools.updated_idl_params_file(filename, params, *, dst=None, missing_ok=False)
- create updated idl file, like at filename but updating the indicated params.returns updated file contents as str if dst is None, else abspath to dst.NEVER overwrites any existing file.
- filename: string
- file to read from.
- params: dict of params to update.
- keys are param names.values are param values or strings (internally, uses str(val) for each val).(if you need a string-valued param within the file, use pattern: ‘“val”’ or “‘val’”.)
- dst: None or str
- file to write result to.None –> return string of updated file contents instead of creating a new file.
- missing_ok: bool
- whether it is okay for one or more of the params to be missing from the file.False –> if any params missing, crash.