I am using subprocess.call() to run some Linux commands using Python code. When I try to capture the value of subprocess.call() in a variable, it does not work. It seems that the variable contains the return value of subprocess.call().
E.g.
When I run the following code, the value of the variable 't' is set to 0.
t=subprocess.call('df -h', shell=True)