import subprocess
import os
import sys	
from subprocess import check_output
proc = subprocess.Popen(["echo 'hello there' | sed -f 's/.* \(.*\)/\1/'"],
       stdout = subprocess.PIPE, shell=True)
(cmd, err) = proc.communicate()
print cmd

0cd6d6845e720f6f8820aca01bf74692ab8a1b03
import subprocess
import os
import sys	
from subprocess import check_output
proc = subprocess.Popen(["echo 'hello there' | sed -f 's/.* \(.*\)/\1/'"],
       stdout = subprocess.PIPE, shell=True)
(cmd, err) = proc.communicate()
print cmd
