timeit

Bryan belred1 at yahoo.com
Sun Jun 15 13:38:12 EDT 2003


i tried timeit for the first time today, pretty darn impressive.  i've
noticed that postings in this newsgroup use timeit on the command line and
with usually just one simple statement or loop.  is this the only way to use
timeit?  can timeit be used within a script?  or to execute whole scripts? i
guess the obvious anwer that one is:

timeit -s"import myscript" "myscript.main()"

i'm just curious how other are exploiting timeit.

thanks,

bryan






More information about the Python-list mailing list