Here\'s the Python code to run an arbitrary command returning its stdout data, or raise an exception on non-zero exit codes:
stdout
proc = subprocess.P
I added the solution with threading from jcollado to my Python module easyprocess.
jcollado
Install:
pip install easyprocess
Example:
from easyprocess import Proc # shell is not supported! stdout=Proc('ping localhost').call(timeout=1.5).stdout print stdout