output from popen

hiral hiralsmaillist at gmail.com
Mon Apr 5 10:03:52 CEST 2010

I am trying following script...

import subprocess
cmd=['time', 'myCmd']
p = subprocess.Popen(cmd)
Where 'myCmd' is some executable path and combination of arguments.

Now I am observing following output...
0.00user 0.00system 0:00.00elapsed 0%CPU (0avgtext+0avgdata
0inputs+0outputs (167major+23minor)pagefaults 0swaps

As you can observe output of 'time' command got printed as garbage.
Can you please let me know how can I get output of 'time' same as

Thank you in advance.

More information about the Python-list mailing list