Timing a python program run

Jyotirmoy Bhattacharya jmoy.matecon at gmail.com
Sun Jul 8 01:03:04 EDT 2007


On Jul 8, 12:21 am, David <dwarnol... at suddenlink.net> wrote:
> Hi,
>
> In matlab, I'd calculate the time for a script named test.m to run
> with:
>
> >> tic, run, toc
>
> Is there some way to do this in python on a mac os x from the terminal
> window? Or whatever?

The timeit module may be of use:
http://docs.python.org/lib/module-timeit.html




More information about the Python-list mailing list