This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author akdor1154
Recipients akdor1154, paul.moore, steve.dower, tim.golden, zach.ware
Date 2020-06-03.04:54:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1591160070.69.0.321919779989.issue40851@roundup.psfhosted.org>
In-reply-to
Content
Hi all,
It seems impossible to show a new console window with calling subprocess.Popen on windows with shell=True.

Attempt:
    si = subprocess.STARTUPINFO()
    si.dwFlags = subprocess.STARTF_USESHOWWINDOW
    si.wShowWindow = 5
    proc = Popen(
        cmd, cwd=runFolder, creationflags=subprocess.CREATE_NEW_CONSOLE, shell=True,
        startupinfo=si
    )

In the current source, it looks like this is due to the block in https://github.com/python/cpython/blob/master/Lib/subprocess.py#L1405 , which unreservedly wipes wShowWindow even if I have provided it.

Testing on Python 3.6 but I am assuming this affects all versions.
History
Date User Action Args
2020-06-03 04:54:30akdor1154setrecipients: + akdor1154, paul.moore, tim.golden, zach.ware, steve.dower
2020-06-03 04:54:30akdor1154setmessageid: <1591160070.69.0.321919779989.issue40851@roundup.psfhosted.org>
2020-06-03 04:54:30akdor1154linkissue40851 messages
2020-06-03 04:54:29akdor1154create