Search notes:

C:\Windows\py.exe

C:\Windows\py.exe is the Python Launcher for Windows. If Python is not installed «for all users», py.exe is found under C:\Users\username\AppData\Local\Programs\Python\Launcher.
py.exe helps to execute Python scripts with different Python versions on a (Windows) system.
Because it is installed in C:\Windows, it does not require the PATH environment variable to be set to a specific Python executable.
In fact, the idea of py.exe is to locate the correct path when needed.
Run a script (or here: command) with the newest Python 2 version:
C:\> py -2 -c "import sys; print (sys.version)"
2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 21:01:17) [MSC v.1500 64 bit (AMD64)]
Run a script (or here: command) with the newest Python 3 version:
C:\> py -3 -c "import sys; print (sys.version)"
3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)]
Show installed Python versions
C:\> py -0
Installed Pythons found by py Launcher for Windows
 -3.8-32 *
 -2.7-64
Specify a more exact version
C:\> py -3.6 some-script.py

Showing the «real» interpreter

Printing the value of sys.executable, it can be seen that py.exe really acts as a launcher to start another executable. It also helps to find out which executable this is:
C:\> py -c "import sys; print (sys.executable)"
C:\Users\rene\AppData\Local\Programs\Python\Python38-32\python.exe

Other installation directories

The launcher is installed under C:\Windows if Python is installed for all users. If Python is installed for one user only, the launcher goes under %LOCALAPPDATA%\Programs\Python.

/bin/python vs /usr/bin/python

A script whose shebang has #!/usr/bin/python can be executed «normally» with py /path/to/script.
However, if the shebang is #!/bin/python, the error Unable to create process using '/bin/python /path/to/script' is thrown.

TODO

The documentation says that the installation of the launcher is registered in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDDLs. However, I found this not to be the case.

Links

The Pyhon launcher is described in PEP 397

Index