def _run_command(self, *args, **kwargs):
<EOL>use_input = kwargs.pop('<STR_LIT>', True)<EOL>capturefile = None<EOL>if environment.flags['<STR_LIT>'] is True:<EOL><INDENT>kwargs.setdefault('<STR_LIT>', PIPE)<EOL>kwargs.setdefault('<STR_LIT>', PIPE)<EOL><DEDENT>elif environment.flags['<STR_LIT>'] == "<STR_LIT:file>":<EOL><INDENT>if '<STR_LIT>' in kwargs and '<STR_LIT>' in kwargs:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>fn = environment.flags['<STR_LIT>']<EOL>capturefile = file(fn, "<STR_LIT:w>")   <EOL>if '<STR_LIT>' in kwargs and '<STR_LIT>' not in kwargs:<EOL><INDENT>kwargs.setdefault('<STR_LIT>', capturefile)<EOL><DEDENT>else:<EOL><INDENT>kwargs.setdefault('<STR_LIT>', STDOUT)<EOL>kwargs.setdefault('<STR_LIT>', capturefile)<EOL><DEDENT><DEDENT><DEDENT>try:<EOL><INDENT>p = self.Popen(*args, **kwargs)<EOL>out, err = p.communicate(use_input=use_input) <EOL><DEDENT>except:<EOL><INDENT>if capturefile is not None:<EOL><INDENT>logger.error("<STR_LIT>", capturefile)<EOL><DEDENT>raise<EOL><DEDENT>finally:<EOL><INDENT>if capturefile is not None:<EOL><INDENT>capturefile.close()<EOL><DEDENT><DEDENT>rc = p.returncode<EOL>return (rc, out, err), p<EOL>
Execute the command; see the docs for __call__.

        :Returns: a tuple of the *results* tuple ``(rc, stdout, stderr)`` and
                  the :class:`Popen` instance.