On 2021-01-10 at 18:38:12 +0100,
Alex Prengère <alexpreng...@gmail.com> wrote:
> 3. Use timeit. The scripts have no side effects so repeating their
> execution the way timeit does, works for me. The only issue is that,
> as far as I know, timeit only allows statements as input parameters,
> not the whole script, like for example:
> $ python -m timeit --script script.py

There's always

py -m timeit -s "from pathlib import Path; data =
Path('your_script.py').read_text()" "exec(data, globals())"

Paul
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/L3L45EBH7MX4CRDHVKYUVMMZQBKN37D4/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to