def dump_tokens(s):
    """Print out the tokens in s in a table format.

    The ENDMARKER is omitted.
    """
    f = StringIO(s)
    for type, token, start, end, line in generate_tokens(f.readline):
        if type == ENDMARKER:
            break
        type = tok_name[type]
        print(locals() % "%(type)-10.10s %(token)-13.13r %(start)s %(end)s")

# This is an example from the docs, set up as a doctest.
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_tokenize.py/dump_tokens/swapped operands of `%`