Re:Show HN: tttfi – Middleware for IFTTT
by oxguy3 on Monday July 17, 2017 @05:03PM
(#14792253)
Python2 is still what comes installed as stock on many distros. I know Fedora/CentOS ship with it, in part because the package manager Yum/DNF is based in Python2.
[ Parent
| on HN ]
That's not even true anymore. From https://fedoralovespython.org/ :
On Fedora, Python comes pre-installed with first class support for
Python virtual environments. It is ready for use straight out of the
box. No guessing package names, no installation, just dive in and go.
Look:
[fedora]$ python3 -m venv env
[fedora]$ . env/bin/activate
(env) [fedora]$ python ...
Note the python3 ...EDIT: wow, 4 downvotes for stating a fact that Fedora developers themselves are shouting from rooftoops. The Python3 hate is strong today.
But what's the output of
python --version
(note not python3)PEP 394 says that python should point to python2 for the time being.
Yup, and it will be reviewed and likely changed at some point:
This recommendation will be periodically reviewed over
the next few years, and updated when the core development
team judges it appropriate.
So it's likely that at some point between here and 2020, or in 2020 at worst, the recommendation will change.IMHO Python 3 has now reached a level of maturity and backward-compatibility where it can safely take over as system python. It's now shipped by Fedora, which means the next RHEL will also ship it. Updating old scripts should mostly be a matter of grepping and shebanging from python to python2, and there is now no point in procrastinating further with this move.
Any proper Python script starts with a shebang:
#!/usr/bin/env python3
This works on all modern Linux distributions today.