I have to get command output to variable in python.
I am using python subprocess
from subprocess import *
var1 = check_output(["some_command"])
Above Command successfully loads command output to variable var1
I want to see real time output on to the terminal. I can use call like below
call(["some command"])
Now i want to achieve two things at same time that is, load output to variable and display output to terminal. Please help me.