Here is a package to work with subprocesses, capture an output: http://pymotw.com/2/subprocess/
For instance to capture an output, you can check_output
import subprocess
output = subprocess.check_output(['ls', '-1'])
print 'Have %d bytes in output' % len(output)
print output