# Feature or enhancement ### Proposal: Taking inspiration from CLI tools such as hyperfine: <img width="647" height="121" alt="Image" src="https://github.com/user-attachments/assets/c14dddbf-9660-4ef2-a1b5-949b8f7a6b6a" /> <img width="642" height="238" alt="Image" src="https://github.com/user-attachments/assets/d680ffd0-4ca7-4635-9971-66792f3c95f7" /> Let's add colour to the CLI output of `python -m timeit`. Standard and verbose: ```sh ./python.exe -m timeit "'-'.join(str(n) for n in range(100))" ./python.exe -m timeit --verbose "'-'.join(str(n) for n in range(100))" ``` <img width="652" height="378" alt="image" src="https://github.com/user-attachments/assets/9b3a6c0f-fc39-4120-b776-291698aefcd7" /> With a warning: ```sh ./python.exe -m timeit --verbose "import time, random; time.sleep(random.random() * 0.5)" ``` <img width="683" height="102" alt="image" src="https://github.com/user-attachments/assets/a14ac43c-3f92-4048-939a-8edbb4f19c9f" /> As usual, environment variables can control colour output. ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of this feature: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-146610 * gh-149334 <!-- /gh-linked-prs -->
Activity
gh-146609: Add colour to `timeit` CLI output (#146610)
pythongh-146609: Add colour to `timeit` CLI output (python#146610)
gh-146609: Use argparse for colour help timeit CLI (#149334)