1 2 3 4 5 6 7 8
% python3 iPython 3.4.0 (default, Jun 19 2015, 14:20:21) [GCC 4.8.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import subprocess >>> subprocess.getoutput('echo hi'); 'hi' >>>