PlasmaCalcs
Usage
PlasmaCalcs API
plasma_calculator
quantities
dimensions
units
hookups
addons
other_calculators
mhd
multi_run_analysis
tools
array_select
arrays
display
docs_tools
fft_tools
history
imports
io_tools
iterables
math
multiprocessing
oop_tools
os_tools
properties
pytools
_inputs_as_dict__maker
displaysource
format_except_missing
format_replace_missing
help_str
indent_doclines
indent_paramdocs
inputs_as_dict
is_iterable
pad_missing_format_keys
print_help_str
printsource
replace_missing_format_keys
value_from_aliases
sentinels
supercomputer
timing
trees
xarray_tools
plotting
defaults
errors
PlasmaCalcs
PlasmaCalcs API
tools
pytools
format_replace_missing
View page source
format_replace_missing
PlasmaCalcs.tools.pytools.
format_replace_missing
(
s
,
replacement
,
**
kw
)
return s.format(**kw) but replace any missing keys with replacement.
E.g. (‘{present} and {missing}’, ‘MISSING’, present=’yes’) –> ‘yes and MISSING’