>>> from subprocess import Popen, PIPE >>> print Popen(["ls", "/var/lib/bluetooth"], stdout=PIPE).communicate()[0]