Re: result of os.times() is different with 'time' command Options

2010-03-15 Thread Gabriel Genellina
En Mon, 15 Mar 2010 03:51:28 -0300, hiral escribió: On Mar 15, 7:14 am, Tim Roberts wrote: hiral wrote: >Output: >real0.0m0.010002421s >user0.0m0.0s >sys 0.0m0.0s >Command: >$ time ls >Output: >real0m0.007s >user0m0.000s >sys 0m0.000s You can't really do an a

Re: result of os.times() is different with 'time' command Options

2010-03-14 Thread hiral
On Mar 15, 7:14 am, Tim Roberts wrote: > hiral wrote: > >... > >Output: > >real    0.0m0.010002421s > >user    0.0m0.0s > >sys     0.0m0.0s > > >Command: > >$ time ls > > >Output: > >real    0m0.007s > >user    0m0.000s > >sys     0m0.000s > > >Is this the intended behaviour? > > What is it th

Re: result of os.times() is different with 'time' command Options

2010-03-14 Thread Tim Roberts
hiral wrote: >... >Output: >real0.0m0.010002421s >user0.0m0.0s >sys 0.0m0.0s > > >Command: >$ time ls > >Output: >real0m0.007s >user0m0.000s >sys 0m0.000s > > >Is this the intended behaviour? What is it that you are wondering about? The formatting difference is due to

result of os.times() is different with 'time' command Options

2010-03-12 Thread hiral
Hi, Python version: 2.6 Script: def pt(start_time, end_time): def ptime(time, time_str): min, sec = divmod(time, 60) hr, min = divmod(min, 60) stmt = time_str + '\t' if hr: stmt += str(hr) + 'h' stmt += str(min) + 'm' + str(sec) + 's'