Message370639
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. |
|
| Date |
User |
Action |
Args |
| 2020-06-03 04:54:30 | akdor1154 | set | recipients:
+ akdor1154, paul.moore, tim.golden, zach.ware, steve.dower |
| 2020-06-03 04:54:30 | akdor1154 | set | messageid: <1591160070.69.0.321919779989.issue40851@roundup.psfhosted.org> |
| 2020-06-03 04:54:30 | akdor1154 | link | issue40851 messages |
| 2020-06-03 04:54:29 | akdor1154 | create | |
|