Code reference

cfg_funcs

These methods are used to parse the values set in the Configuration file and convert them to the correct type.

drymass.cfg_funcs.fbool(value)[source]

Boolean value from string or number

drymass.cfg_funcs.fintlist(alist)[source]

List of integers from string or list of strings/integers

drymass.cfg_funcs.float_or_str(flt_or_str)[source]

Float value from string or number

drymass.cfg_funcs.floattuple_or_one(fti)[source]

Tuple of floats or ±1 from a string or a number

drymass.cfg_funcs.int_or_str(it_or_str)[source]

Integer or string from a string or a number

drymass.cfg_funcs.lcstr(astr)[source]

Convert a string to lower-case

drymass.cfg_funcs.tupletupleint(items)[source]

A tuple containing x- and y- slice tuples from a string or tuple