[issue39785] usr/bin/python doesn't use default python (3) on Windows

2020-02-28 Thread fireattack


fireattack  added the comment:

I've searched and found some related issue, but none is specific for this. 

For example, Segev Finer mentioned that "[..] "#!/usr/bin/python" which will 
prefer Python 2" in issue 34274 but didn't mention why it would/should.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39785] usr/bin/python doesn't use default python (3) on Windows

2020-02-28 Thread fireattack


New submission from fireattack :

STR

1. Install both Py2 and 3. 
2. Make sure Py3 is the default.
3. (Optional) Make sure only Python3 is in path, not Python2.

Run the following script from CMD:

```
#!/usr/bin/python

import platform
print(platform.python_version())
```

What expected:

3.8.1

What happened: 

2.8.5

According to https://docs.python.org/3/using/windows.html#shebang-lines, 
`#!/usr/bin/python` should use the default python. My environment is set to 
default to py3, and I don't even have python2 in my PATH. 

C:\Users\ikena\Desktop>py --version
Python 3.8.1

C:\Users\ikena\Desktop>python --version
Python 3.8.1

C:\Users\ikena\Desktop>where python
C:\Users\ikena\AppData\Local\Programs\Python\Python38\python.exe
C:\Users\ikena\AppData\Local\Microsoft\WindowsApps\python.exe

--
components: Windows
messages: 362892
nosy: fireattack, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: usr/bin/python doesn't use default python (3) on Windows
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com