new_header = re.sub('(?i)pythonw.exe', 'python.exe', header)
if os.path.exists(new_header[2:-1]) or sys.platform != 'win32':
    hdr = new_header
else:
    hdr = header
Create launchable GUI script from Python setuptools (without console window!)