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

2023-12-24 Thread Chris Angelico via Python-list
On Mon, 25 Dec 2023 at 15:42, Mike Dewhirst via Python-list
 wrote:
>
> Apologies for top posting - my phone seems unable to do otherwise.
>
> Here's my view - which may not be popular.

You're right about that part, anyhow :)

> 4. Shebang lines are pretty much redundant now that most python interpreters 
> are run from venvs

Strongly dispute that. The rest. you're entitled to your opinions
(they happen to be wrong, but you're entitled to them :) ), but this
is a statement of fact that I would need to see some evidence for.

ChrisA
-- 
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-24 Thread Mike Dewhirst via Python-list
Apologies for top posting - my phone seems unable to do otherwise.

Here's my view - which may not be popular.

1. Py.exe is an awful idea. 

2. Installing python in %PROGRAMFILES% is not a good idea

3. Installing Python from a Microsoft shop or server is a bad idea

4. Shebang lines are pretty much redundant now that most python interpreters 
are run from venvs

5. Shebang lines have never had a place in Windows

TL;DR

1. Py.exe is not a standard python thing and learning to rely on it is 
following Microsoft's marketing strategy. That strategy has served them 
brilliantly since the 1980s. They make their environment just different enough 
to force users to invest brainspace to make it work and thereby lock-in their 
users with their own muscle-memory. Very subtle. Not.

2. Installing Python in Microsoft's preferred location wasn't always 
"standard". Python downloaded from python.org always defaulted to C:\PythonXXX. 
I'm not saying that was a perfect location but at least it was (in my case 
still is) nicely visible for researching multiple different pythons. Putting 
deep in Program files does nothing other than hide it. 

3. You cannot trust Microsoft. You can trust Python Software Foundation. Python 
from PSF works the same in all environments - or if not it is a bug. Python 
from Microsoft is tweaked to satisfy their aforementioned strategy of locking 
in users to Windows.

4. Shebang lines are a fallback if you don't wish to type the interpreter 
location before typing your script name. You must know your interpreter 
location to get the shebang line right. Shebangs were never intended as primary 
devices. They are linux/unix things.

5. Shebangs on Windows are a new opportunity for Microsoft to plough its own 
furrow. They are difficult to handle simply because of 4 above.

To finish this rant, I believe it is far better to aim for standardisation 
rather than subtle and annoying differences deliberately designed to supplant 
standards in favour of market dominance.

Merry Christmas all

Cheers

Mike




On 24 December 2023 3:35:42 am AEDT, Michael Torrie via Python-list 
 wrote:
>On 12/22/23 20:56, Thomas Passin via Python-list wrote:
>> It's just better not to make assumptions about which version of Python 
>> will be running. Just specify it yourself when you can, and then you can 
>> be sure.
>
>Precisely, which is why the shebang is so useful, even on Windows with
>py launcher.  For example, set the shebang to:
>
>#!/usr/bin/python3.6
>
>And py launcher will always try to run it with Python 3.6.
>
>-- 
>https://mail.python.org/mailman/listinfo/python-list
-- 
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-24 Thread Barry via Python-list



> On 24 Dec 2023, at 00:54, rbowman via Python-list  
> wrote:
> 
> Does that work with virtualenv or conda? I'm slowly getting up to speed
> with those.

Conda is its own thing, not need for py.exe.

Once you have created the venv you do not need py.exe as you will have 
pythob.exe in the venv bin folder.

Barry



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What is Install-Paths-To in WHEEL file?

2023-12-24 Thread Barry via Python-list



> On 24 Dec 2023, at 00:58, Left Right via Python-list  
> wrote:
> 
> I'm trying to understand the contents of Wheel files

There are lots of packaging experts that hang out on 
https://discuss.python.org/ you are likely to get a response there if not here 
replies.

Barry

-- 
https://mail.python.org/mailman/listinfo/python-list