def printable(text):

    ansi = re.compile(r'\x1b\[[^Jm]*[Jm]')
    return ansi.sub('', text).rstrip()
Like iteritems(), but with all lowercase keys.
dataset/ETHPy150Open d11wtq/dockerpty/tests/util.py/printable--crossover with--dataset/ETHPy150Open Bolton-and-Menk-GIS/restapi/restapi/requests/structures.py/CaseInsensitiveDict.lower_items