code: def popen(command, tempFile):
      
      fileHandle = open(tempFile, 'w')
      logger.debug("Running the command: %s" % command)
      sts = subprocess.call(command, shell=True, stdout=fileHandle, bufsize=-1)
      fileHandle.close()
      if sts != 0:
          raise RuntimeError("Command: %s exited with non-zero status %i" % (command, sts))
      return sts
docs: Runs a command and captures standard out in the given temp file.