update_eppic_i_file
- PlasmaCalcs.hookups.eppic.eppic_io_tools.update_eppic_i_file(src='eppic.i', dst='eppic_updated.i', values={}, *, exists_ok=False, missing_values_ok=True, comment='previously={old}')
update eppic.i file from src, writing to dst.
values: dict{varname: value} for all pairs to update.Can also provide {dist number: dict of {varname: value} pairs to update for this dist}(inside of dist number dicts, varname can end with dist number or not;assume it does end with dist number in the file itself though)exists_ok: bool, default Falsewhether it is okay for dst to already exist.missing_values_ok: boolwhether it is okay for some of the varnames in values to not exist in eppic.icomment: None or strif not None, append comment as a comment to all updated lines.(actually appends: ‘ ; {comment}’.)Only appends if line doesn’t already end with comment.Also, this comment will be hit by .format(old=old value)Note: this routine isn’t smart enough to add new varnames to eppic.i;it’s only smart enough to update the values at existing varnames.return abspath to dst.