Re: How to use time.clock() function in python

2007-01-22 Thread samuel . y . l . cheung
Thanks. I have a fuction called 'func1'. def func1: # logic of the function When my script just call 'func1()' it works. func1() But when put it under timerit.Timer, like this: t = timeit.Timer("func1()","") t.repeat(1, 10) # want to time how long it takes to run 'func1' 10 times, I get a

Re: How to use cmp() function to compare 2 files?

2007-02-27 Thread samuel . y . l . cheung
On Feb 27, 12:07 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > wrote: > > > File "./scripts/regressionTest.py", line 30, in getSnapShot > > if (difflib.context_diff(f1.readlines(), f2.readlines()).len() == > > 0): > > # no diffe