i know that in python, os.system(cmd) can be used to execute a script or command, and the return value is 0 if successful, rather than the standard output of the script that it executes.
e.g.
>>> a=os.system("ec ho hello")
>>> a
0 (rather than "hello")
my question is how to direct the standard output into a variable in my python script.
e.g.
>>> a=os.system("ec ho hello")
>>> a
0 (rather than "hello")
my question is how to direct the standard output into a variable in my python script.
Comment