mishmash.util module¶
-
mishmash.util.
addLibraryArguments
(cli: argparse.ArgumentParser, nargs)[source]¶ Add library options (-L/–library) with specific nargs.
-
mishmash.util.
mostCommonItem
(lst)[source]¶ Choose the most common item from the list, or the first item if all items are unique.
-
mishmash.util.
normalizeCountry
(country_str, target='iso3c')[source]¶ Return a normalized name/code for country in country_str. The input can be a code or name, the target determines output value. 3 character ISO code is the default (iso3c), or ‘iso2c’; otherwise then formal name is returned.
Raises
ValueError
if the country is unrecognized.