Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread J.O. Aho via Python-list
On 22/12/2023 13.36, Sibylle Koczian wrote: Hello, I always install Python on Windows in the same manner: - Python is not on the path, - it is installed for all users, - the Python Launcher is installed for all users, - the file types .py, .pyw etc. are associated with Python. My shebang line

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Christian Buhtz via Python-list
What is the "command line" on your Windows 11? On Windows 10 it usually is "cmd.exe" (Windows Command Prompt). On Windows 11 it usually is the "Terminal" which is different from cmd.exe. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Barry via Python-list
> On 22 Dec 2023, at 12:39, Sibylle Koczian via Python-list > wrote: > > Hello, > > I always install Python on Windows in the same manner: > > - Python is not on the path, > - it is installed for all users, > - the Python Launcher is installed for all users, > - the file types .py, .pyw

making your own DirEntry.

2023-12-22 Thread Antoon Pardon via Python-list
I am writing a program that goes through file hierarchies and I am mostly using scandir for that which produces DirEntry instances. At times it would be usefull if I could make my own DirEntry for a specific path, however when I try, I get the following diagnostic: os.DirEntry('snap')

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Barry via Python-list
> On 22 Dec 2023, at 14:29, Sibylle Koczian wrote: > > #!/usr/bin/env/python That was what i thought you had and it will not work. The BOM suggestion is worth trying. Barry -- https://mail.python.org/mailman/listinfo/python-list

Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Sibylle Koczian via Python-list
Hello, I always install Python on Windows in the same manner: - Python is not on the path, - it is installed for all users, - the Python Launcher is installed for all users, - the file types .py, .pyw etc. are associated with Python. My shebang line is usually "#!/usr/bin/env python3". This

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Sibylle Koczian via Python-list
Am 22.12.2023 um 14:13 schrieb Barry: On 22 Dec 2023, at 12:39, Sibylle Koczian via Python-list wrote: Hello, I always install Python on Windows in the same manner: - Python is not on the path, - it is installed for all users, - the Python Launcher is installed for all users, - the file

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Barry via Python-list
> On 22 Dec 2023, at 14:58, Christian Buhtz via Python-list > wrote: > > On Windows 11 it usually is the "Terminal" which is different from cmd.exe. In terminal app you can run cmd.exe or powershell, so it is basically the same. Barry --

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Thomas Passin via Python-list
On 12/22/2023 9:29 AM, Sibylle Koczian via Python-list wrote: Am 22.12.2023 um 14:13 schrieb Barry: On 22 Dec 2023, at 12:39, Sibylle Koczian via Python-list wrote: Hello, I always install Python on Windows in the same manner: - Python is not on the path, - it is installed for all

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Thomas Passin via Python-list
On 12/22/2023 7:19 PM, Barry wrote: On 23 Dec 2023, at 00:15, Thomas Passin via Python-list wrote: In neither case is the shebang line used. As i understand it, not in front of my windows box to check. The handler for .py file extension is set to be the py.exe It is py.exe that

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Barry via Python-list
> On 23 Dec 2023, at 00:15, Thomas Passin via Python-list > wrote: > > In neither case is the shebang line used. As i understand it, not in front of my windows box to check. The handler for .py file extension is set to be the py.exe It is py.exe that understands shebang lines. Barry --

Re: making your own DirEntry.

2023-12-22 Thread DL Neil via Python-list
Antoon, On 12/23/23 01:00, Antoon Pardon via Python-list wrote: I am writing a program that goes through file hierarchies and I am mostly using scandir for that which produces DirEntry instances. At times it would be usefull if I could make my own DirEntry for a specific path, however when I

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Thomas Passin via Python-list
On 12/22/2023 7:36 AM, Sibylle Koczian via Python-list wrote: Hello, I always install Python on Windows in the same manner: - Python is not on the path, - it is installed for all users, - the Python Launcher is installed for all users, - the file types .py, .pyw etc. are associated with

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Thomas Passin via Python-list
On 12/22/2023 7:27 PM, Michael Torrie via Python-list wrote: On 12/22/23 07:02, Thomas Passin via Python-list wrote: On my Windows 10 machine, Python scripts run without a shebang line. Perhaps Windows 11 has added the ability to use one, but then you would need to use the actual location of

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Michael Torrie via Python-list
On 12/22/23 11:42, Thomas Passin via Python-list wrote: > There is some important context that is missing here. Python on Windows > does not normally install to that location. That is not even a Windows > path, neither by directory name nor by path separators. No, that's just the way the py

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Michael Torrie via Python-list
On 12/22/23 07:02, Thomas Passin via Python-list wrote: > On my Windows 10 machine, Python scripts run without a shebang line. > Perhaps Windows 11 has added the ability to use one, but then you would > need to use the actual location of your Python executable. Yes if you associate .py or .pyw