inxs.utils module

inxs.utils.is_Ref(obj)[source]

Tests whether the given object is a reference to a symbol.

inxs.utils.reduce_whitespaces(text: str, translate_to_space: str = '\t\n\r\x0b\x0c', strip: str = 'lr') → str[source]

Reduces the whitespaces of the provided string by replacing any of the defined whitespaces with a simple space (U+20) and stripping consecutive ones to a single one.

Parameters:
  • text – The input string.
  • translate_to_space – The characters that should are defined as whitespace. Defaults to all common whitespace characters from the ASCII set.
  • strip – The ‘sides’ of the string to strip from any whitespace at all, indicated by ‘l’ for the beginning and/or ‘r’ for the end of the string.
Returns:

The resulting string.

inxs.utils.resolve_Ref_values_in_mapping(mapping, transformation)[source]

Returns a mapping where all references to symbols are replaced with the current value of these symbols.