New submission from akdor1154 :
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.
--
components: Windows
messages: 370639
nosy: akdor1154, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: subprocess.Popen: impossible to show console window when shell=True
versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python
3.9
___
Python tracker
<https://bugs.python.org/issue40851>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com