Python provides a lot of method to read output from a just executed shell. However many of them has been deprecated(Not recommened). But subprocess works at present compared to other methods.
from subprocess import Popen,PIPE,STDOUT |
A detailed description about subprocess has been written down here. http://docs.python.org/2/library/subprocess.html
Others
- Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython