Eryk Sun <eryk...@gmail.com> added the comment:

I think you have the right idea for improving the behavior here. It should skip 
setting wShowWindow if startupinfo already has the flag STARTF_USESHOWWINDOW. 
For example:

    if shell:
        comspec = os.environ.get("COMSPEC", "cmd.exe")
        args = '{} /c "{}"'.format (comspec, args)
        if not startupinfo.dwFlags & _winapi.STARTF_USESHOWWINDOW:
            startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW
            startupinfo.wShowWindow = _winapi.SW_HIDE

----------
components: +Library (Lib)
nosy: +eryksun
stage:  -> needs patch
type:  -> enhancement
versions:  -Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40851>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to