I want the output of the jobs command run in the shell as a string in python.
I have this code
import subprocess p1 = subprocess.Popen(['jobs'], shell=True, stdout=subprocess.PIPE) print p1.communicate() But this doesnt seem to work. The output I get is -
('', None) How do I fix this?
p1.returncode? (Btw., you don't needshell=True.)