python version 2 vs 3, command name inconsistency, and .py filename extension ambiguity problem (2026)
python version problem
In emacs, i have a command that calls python formatter to format the current file. I need to know, what is the shell command name to invoke python 3.
turns out, there is no standard way.
on some machine, python is version 3, on some it's version 2, on some it's python3.
python command names should have fixed meaning. e.g. in shell
pythonalways means version 2python2always means version 2python3always mean version 3.- version 3 is always
python3
But the idiot guido has PEP this and that, but no PEP on this. Result is, python can mean 2 or 3 on different machines.
also, filename extention .py3 should be created, so its clear always means version 3. but the idiot refuse. so now, u cant tell if name .py is 2 or 3 script.
worse, on windows, they created py.exe.
great, it allows a way to resolve the version by a new alias locally.
but sadly, its just a windows thing, there is no py alias on linux,
so you cannot rely on calling py.
What the faak. You know why this happens? It's my guess, guido is arrogant, he thinks there is only one clean python lang. He didnt want a .py3 to remind people there was a big ugly incompatible change to python. Which made the transition much more painful.
making a change to my emacs code.
python install location on Microsoft Windows changes
also, the python guys can't decide which location to install on windows.
- in Python 3.9, it's
C://Python39/ - in Python 3.12, it's
~/AppData/Local/Programs/Python/ - in Python 3.14, it's
~/AppData/Local/Python/
# ['c:\\Users\\xah\\.emacs.d\\temp', # 'C:\\Python39\\python39.zip', # 'C:\\Python39\\DLLs', # 'C:\\Python39\\lib', # 'C:\\Python39', # 'C:\\Python39\\lib\\site-packages']
python windows installer no option to install on d drive.
and, the idiotic windows installer, no have option to install on d drive.