title: Passing output from subprocess.Popen to a if elif statement
body: <p>Im creating a python script to check for suPHP i'm trying to create an if else statement to declare if suPHP is on the server using output from subprocess.Popen </p>
  
  <p>I've tested the output of the variable with print before i created this post and it pass's the correct output to the variable suphp. This is what i have so far:</p>
  
  <pre><code># check for suPHP
  suphp =  subprocess.Popen("/usr/local/cpanel/bin/rebuild_phpconf --current", shell=True, stdout=subprocess.PIPE,).communicate()[0]
  
   if suphp = "/bin/sh: /usr/local/cpanel/bin/rebuild_phpconf: No such file or directory"          
      print "suPHP is not installed on the server"
   elif
      print suphp
  </code></pre>
  
  <p>Please note I am new to coding and python and decided to try to use python to admin some servers.</p>