It is hard to live without timeit
>>> # Python shell usage
... import timeit
>>> tt = timeit.Timer("foo = 'time this'", "print 'setup with this arg'")
>>> tt.timeit(number=1000)
setup with this arg
0.00021100044250488281
>>>
[mpenning@Bucksnort ~]$ # Bash shell usage
[mpenning@Bucksnort ~]$ # 5 runs with 1000 samples each.
[mpenning@Bucksnort ~]$ python -m timeit -n 1000 -r 5 -s "print 'setup w/ this arg'" \
"foo = 'time this'"
setup w/ this arg
setup w/ this arg
setup w/ this arg
setup w/ this arg
setup w/ this arg
1000 loops, best of 5: 0.173 usec per loop
[mpenning@Bucksnort ~]$