The problem is that the shebang of gui_scripts is not changed to #!pythonw.exe!
In my case new_header[2:-1] is "python.exe" (as set in get_script_header line 1420), thus os.path.exists(new_header[2:-1]) is false, and sys.platform!='win32' is false as well. hdr is never changed, and the gui script is started showing an ugly console
|