[Python-ideas] Re: About python3 on windows

2020-03-25 Thread Steve Barnes
Of course if, rather than creating symlinks, you create a batch file called python3.bat and containing the line: @py -3 %* Then save it to somewhere on your path, e.g. the python scripts directory, then issuing, from the command line or another batch file the command python3 should just work (as

[Python-ideas] Re: About python3 on windows

2020-03-25 Thread Eryk Sun
On 3/24/20, Mike Miller wrote: > On 2020-03-24 11:58, Eryk Sun wrote: > >> You can manually copy or symlink python.exe to python3.exe in the >> installation directory and venv "Scripts" directories. However, it >> will only be used on the command line, and other contexts that search >> PATH. Curre

[Python-ideas] Say what? Instance method to test equivalence between set and iterable

2020-03-25 Thread Stephen J. Turnbull
Hi, I can't believe we've gone this far: > >> >>> s = set("a") > >> >>> t = list("aa") > >> >>> s.issubset(t) > >> True > >> >>> s.issuperset(t) > >> True > > In *some* sense they are equal: [demonstration elided] > I don't know that this is an *important* sense, but the OP Steve J

[Python-ideas] Re: About python3 on windows

2020-03-25 Thread Eryk Sun
On 3/25/20, Steve Barnes wrote: > Of course if, rather than creating symlinks, you create a batch file called > python3.bat and containing the line: > @py -3 %* Batch scripts execute via cmd.exe, with an attached console, and when Ctrl+C is typed they display a "Terminate batch job (Y/N)?" prompt

[Python-ideas] Re: About python3 on windows

2020-03-25 Thread Eryk Sun
On 3/25/20, Steve Barnes wrote: >> Except it's not necessarily what the original post wants. The OP wants the >> shebang "#!/usr/bin/env python3" to "work everywhere by >> default", for which I assume it's implied that it should work consistently >> everywhere. I'd prefer for the launcher's env se

[Python-ideas] Re: About python3 on windows

2020-03-25 Thread Barry Scott
> On 25 Mar 2020, at 09:15, Eryk Sun wrote: > > On 3/25/20, Steve Barnes wrote: >>> Except it's not necessarily what the original post wants. The OP wants the >>> shebang "#!/usr/bin/env python3" to "work everywhere by >>> default", for which I assume it's implied that it should work consiste

[Python-ideas] Re: About python3 on windows

2020-03-25 Thread Paul Moore
On Wed, 25 Mar 2020 at 11:43, Barry Scott wrote: > I think the reasoning is that the whole point of the py.exe is to avoid having > users edit their PATH on Windows. And further the thinking goes that > you do not need the alternatively named python programs. The alternatively named programs have

[Python-ideas] Re: About python3 on windows

2020-03-25 Thread Eryk Sun
On 3/25/20, Barry Scott wrote: >> On 25 Mar 2020, at 09:15, Eryk Sun wrote: >> >> That is not consistent with Unix. env is supposed to search PATH for >> the command. However, the launcher does not search PATH for a >> versioned command such as "python3". Instead it uses the highest >> version th

[Python-ideas] Re: About python3 on windows

2020-03-25 Thread Paul Moore
On Wed, 25 Mar 2020 at 16:10, Eryk Sun wrote: > The py launcher's "env" command searches PATH for anything from > "python" to "notepad" -- but not for a versioned Python command such > as "python3" or "python2". It always uses a registered installation > in this case, which is at the very least

[Python-ideas] Re: About python3 on windows

2020-03-25 Thread Andrew Barnert via Python-ideas
On Mar 25, 2020, at 05:02, Paul Moore wrote: > > The only reason anyone has ever suggested versioned executables on > Windows is for Unix compatibility - the reasons they are needed on > Unix simply don't apply on Windows (at least not in my experience - > it's possible that some peoplehave workf