(self, args, executable, preexec_fn, close_fds,
                       cwd, env, universal_newlines,
                       startupinfo, creationflags, shell, to_close,
                       p2cread, p2cwrite,
                       c2pread, c2pwrite,
                       errread, errwrite)
Code from part of _execute_child from Python 2.7 (9fbb65e)

        There are only 2 little changes concerning the construction of
        the the final string in shell mode: we preempt the creation of
        the command string when shell is True, because original function
        will try to encode unicode args which we want to avoid to be able to
        sending it as-is to ``CreateProcess``.
Code from part of _execute_child from Python 2.7 (9fbb65e)
Code from part of _execute_child from Python 2 . 7 ( 9fbb65e )
def _execute_child(self, args, executable, preexec_fn, close_fds,
                       cwd, env, universal_newlines,
                       startupinfo, creationflags, shell, to_close,
                       p2cread, p2cwrite,
                       c2pread, c2pwrite,
                       errread, errwrite):
        """Code from part of _execute_child from Python 2.7 (9fbb65e)

        There are only 2 little changes concerning the construction of
        the the final string in shell mode: we preempt the creation of
        the command string when shell is True, because original function
        will try to encode unicode args which we want to avoid to be able to
        sending it as-is to ``CreateProcess``.

        """
        if not isinstance(args, subprocess.types.StringTypes):
            args = subprocess.list2cmdline(args)

        if startupinfo is None:
            startupinfo = subprocess.STARTUPINFO()
        if shell:
            startupinfo.dwFlags |= _subprocess.STARTF_USESHOWWINDOW
            startupinfo.wShowWindow = _subprocess.SW_HIDE
            comspec = os.environ.get("COMSPEC", u'cmd.exe')
            args = u'{} /c "{}"'.format(comspec, args)
            if (_subprocess.GetVersion() >= 0x80000000 or
                    os.path.basename(comspec).lower() == 'command.com'):
                w9xpopen = self._find_w9xpopen()
                args = u'"%s" %s' % (w9xpopen, args)
                creationflags |= _subprocess.CREATE_NEW_CONSOLE

        super(Popen, self)._execute_child(args, executable,
            preexec_fn, close_fds, cwd, env, universal_newlines,
            startupinfo, creationflags, False, to_close, p2cread,
            p2cwrite, c2pread, c2pwrite, errread, errwrite)
def _execute_child ( self , args , executable , preexec_fn , close_fds , cwd , env , universal_newlines , startupinfo , creationflags , shell , to_close , p2cread , p2cwrite , c2pread , c2pwrite , errread , errwrite ) : if not isinstance ( args , subprocess . types . StringTypes ) : args = subprocess . list2cmdline ( args ) if startupinfo is None : startupinfo = subprocess . STARTUPINFO ( ) if shell : startupinfo . dwFlags |= _subprocess . STARTF_USESHOWWINDOW startupinfo . wShowWindow = _subprocess . SW_HIDE comspec = os . environ . get ( "COMSPEC" , u'cmd.exe' ) args = u'{} /c "{}"' . format ( comspec , args ) if ( _subprocess . GetVersion ( ) >= 0x80000000 or os . path . basename ( comspec ) . lower ( ) == 'command.com' ) : w9xpopen = self . _find_w9xpopen ( ) args = u'"%s" %s' % ( w9xpopen , args ) creationflags |= _subprocess . CREATE_NEW_CONSOLE super ( Popen , self ) . _execute_child ( args , executable , preexec_fn , close_fds , cwd , env , universal_newlines , startupinfo , creationflags , False , to_close , p2cread , p2cwrite , c2pread , c2pwrite , errread , errwrite )