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 long as the chosen location is earlier in the path than 
%appdata%\..\Local\Microsoft\WindowsApps\ which is where the python3.exe app 
store launcher lives). 

As the py launcher works just find in MinGW you can either do the same with a 
bash script or an alias and the Windows System For Linux allows you to install 
python3 as well as python (on my system the latest versions are 3.5.1-3 & 
2.7.12-1).

It is also worth mentioning that python (and the py launcher) both accept 
windows paths (\ separated) and *nix paths (/ separated) from the command line 
and that from within scripts the *nix path separator is to be preferred as it 
will not require either being in a r-string or escaped i.e. you can use 
glob.glob(r"C:\Users\Gadget\*.docx") or 
glob.glob("C:\\Users\\Gadget\\Documents\\*.docx") but are better off using 
glob.glob("C:/Users/Gadget/Documents/*.docx") - the only real issue to avoid is 
the fact that Windows paths are case insensitive so names that differ only in 
case changes can & will collide.

-----Original Message-----
From: Mike Miller <python-id...@mgmiller.net> 
Sent: 24 March 2020 21:39
To: python-ideas@python.org
Subject: [Python-ideas] Re: About python3 on windows


On 2020-03-24 11:58, Eryk Sun wrote:
> On 3/24/20, Mike Miller <python-id...@mgmiller.net> wrote:
>>
>>       C:\Users\User>python3
>>       (App store loads!!)
> 
> If installed, the app distribution has an appexec link for 
> "python3.exe" that actually works.
> 
>>       C:\Python38>dir
>>        Volume in drive C has no label.
>> [snip]
>> Note there is no python3.exe binary.
> 
> 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. Currently the launcher will not use it with a virtual "env"
> shebang. The launcher will search PATH for "python", but not 
> "python3".


Thanks.  Sure, there are many ways to fix this manually, or work around it. 
Would be great if it was consolidated, with one command "to rule them all."
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an 
email to python-ideas-le...@python.org 
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/F2NEZJXKW4HAZUMXC4IW27KIMT67Y4VN/
Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/PRZ6OOSU74FXHR225ZMYCHVXDXG2LAAK/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to