I read this somewhere a while ago but cant seem to find it. I am trying to find a command that will execute commands in the terminal and then output the result.
For
The os.popen() is pretty simply to use, but it has been deprecated since Python 2.6. You should use the subprocess module instead.
Read here: reading a os.popen(command) into a string