clocking subprocesses

Preston Landers planders at gmail.com
Mon Mar 3 20:41:38 CET 2008


On Mar 3, 11:57 am, barnbu... at gmail.com wrote:

> So, long story short, I need to get CPU time of something I call using
> subprocess.call().  

Run your command through the "time" program.  You can parse the output
format of "time", or set a custom output format.  This mostly applies
to Unix-like systems but there is probably an equivalent somewhere on
Windows.

Preston



More information about the Python-list mailing list