pythonw.exe from venv in 3.13 always creates console window #126084
Labels
3.13
bugs and security fixes
OS-windows
topic-venv
Related to the venv module
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
In 3.13.0a4 yet another form of launcher executable was added, apparently called "venvlauncher". This latest creation is apparently unaware that pythonw (the GUI subsystem, no-console-window form of interpreter) exists and always runs the regular python.exe (CLI subsystem). Therefore any attempt to run a script in 3.13 will either attach to the current console or create a new, blank console window.
I have not tried building venvlauncher.c with a different definition of EXENAME to see if that works, but since %PROGRAMFILES%\Python313\Lib\venv\scripts\nt\venvwlauncher.exe does not contain the string "pythonw", I'm pretty sure my guess is correct.
There is plenty of infrastructure in the Windows build to make this work, not least this block in venvlauncher.c:
Someone probably forgot to hook up the external definition in the build.
CPython versions tested on:
3.13
Operating systems tested on:
Windows
Linked PRs
The text was updated successfully, but these errors were encountered: