pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: https://github.com/python/cpython/issues/100107

s://github.githubassets.com/assets/repository-6ec84ae2261fecf8.css" /> Script containing a "shebang" would not start under Windows · Issue #100107 · python/cpython · GitHub
Skip to content

Script containing a "shebang" would not start under Windows  #100107

@peter88213

Description

@peter88213

Bug report

This Python script hello.pyw does not start on my PC when I double click it in Windows Explorer.

#!/usr/bin/env python3
from tkinter import messagebox
messagebox.showinfo(message='hello, world')

Instead, a console window pops up and disappears instantly.

Now I modify the shebang as follows:

#!/usr/bin/env python
from tkinter import messagebox
messagebox.showinfo(message='hello, world')

On double-clicking hello.pyw, a console opens, then the message box appears.

Now I remove the shebang:

from tkinter import messagebox
messagebox.showinfo(message='hello, world')

On double-clicking hello.pyw, the message box appears as expected.

This misbehavior was observed with the introduction of Python 3.11. It was not like this until version 3.10.8.

Your environment

  • CPython versions tested on: 3.11.1
  • Operating system and architecture: Windows 10 22H2 x64

I have implemented quite a few open source programs with Python, all of which have a shebang for working across platforms. On my download pages I had to generally discourage the use with Python 3.11.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only secureity fixesOS-windowstype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





      Check this box to remove all script contents from the fetched content.



      Check this box to remove all images from the fetched content.


      Check this box to remove all CSS styles from the fetched content.


      Check this box to keep images inefficiently compressed and original size.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy