There are many good SO links on this one. try Running shell command from Python and capturing the output or Assign output of os.system to a variable and prevent it from being displayed on the screen for starters. In short
import subprocess
direct_output = subprocess.check_output('ls', shell=True) #could be anything here.
The shell=True flag should be used with caution:
From the docs:
Warning
Invoking the system shell with shell=True can be a security hazard if combined with untrusted input. See the warning under Frequently Used Arguments for details.
See for much more info: http://docs.python.org/2/library/subprocess.html