def popen(self, cmdargs, stdout, stderr, **kw):
env = os.environ.copy()<EOL>env["<STR_LIT>"] = os.pathsep.join(<EOL>filter(None, [os.getcwd(), env.get("<STR_LIT>", "<STR_LIT>")])<EOL>)<EOL>env["<STR_LIT>"] = str(self.tmpdir)<EOL>env["<STR_LIT>"] = env["<STR_LIT>"]<EOL>kw["<STR_LIT>"] = env<EOL>popen = subprocess.Popen(<EOL>cmdargs, stdin=subprocess.PIPE, stdout=stdout, stderr=stderr, **kw<EOL>)<EOL>popen.stdin.close()<EOL>return popen<EOL>
Invoke subprocess.Popen.

        This calls subprocess.Popen making sure the current working directory
        is in the PYTHONPATH.

        You probably want to use :py:meth:`run` instead.