From b75a164daaf0087cf319aab3d8700586580ed7b6 Mon Sep 17 00:00:00 2001 From: Hernan Martinez Date: Sun, 13 Apr 2025 12:52:47 -0600 Subject: [PATCH] easy_install.get_win_launcher: Default to pythonw.exe in GUI mode --- launcher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launcher.c b/launcher.c index b87cb32ad6..90178edefb 100644 --- a/launcher.c +++ b/launcher.c @@ -291,8 +291,8 @@ int run(int argc, char **argv, int is_gui) { *ptr-- = '\0'; if (strncmp(python, "#!", 2)) { - /* default to python.exe if no #! header */ - strcpy(python, "#!python.exe"); + /* default to python[w].exe if no #! header */ + strcpy(python, is_gui ? "#!pythonw.exe" : "#!python.exe"); } parsedargs = parse_argv(python+2, &parsedargc);