You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pythonw.exe from venv in 3.13 always creates console window #126084
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:
// This should always be defined when we build for real,
// but it's handy to have a definition for quick testing
#ifndef EXENAME
#define EXENAME L"python.exe"
#endif
Someone probably forgot to hook up the external definition in the build.
changed the title [-]pythonw.exe in 3.13 always creates console window[/-][+]pythonw.exe from venv in 3.13 always creates console window[/+]on Oct 28, 2024
Activity
[-]pythonw.exe in 3.13 always creates console window[/-][+]pythonw.exe from venv in 3.13 always creates console window[/+]Fix venvwlauncher to run pythonw
gh-126084: Fix venvwlauncher.exe to run pythonw.exe (GH-126088)
pythongh-126084: Fix venvwlauncher.exe to run pythonw.exe (pythonGH-1…
gh-126084: Fix venvwlauncher.exe to run pythonw.exe (GH-126088)
pythongh-126084: Fix venvwlauncher.exe to run pythonw.exe (pythonGH-1…
pythongh-126084: Fix venvwlauncher.exe to run pythonw.exe (pythonGH-1…