code: def _adjust_header(cls, type_, orig_header):
          
          pattern = 'pythonw.exe'
          repl = 'python.exe'
          if type_ == 'gui':
              pattern, repl = repl, pattern
          pattern_ob = re.compile(re.escape(pattern), re.IGNORECASE)
          new_header = pattern_ob.sub(string=orig_header, repl=repl)
          return new_header if cls._use_header(new_header) else orig_header
docs: Make sure 'pythonw' is used for gui and and 'python' is used for
          console (regardless of what sys.executable is).