terminal - How to store output from a python file into a variable -


i m calling executable in python script gives output in terminal follows:

number of iterations: 150

average time per step 0.306834 ms

average time collisions 0.027553 ms

average time velocity updates 0.109900 ms

average time position updates 0.031053 ms

total loop time 46.2161 ms

but want store text in variable can edit it. how this???

use subprocess. lets redirect output. do:

output = subprocess.check_output(args) 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -