3 ms·
But what's the output of python --version (note not python3)
by OJFord 9y ago
But what's the output of
python --version
(note not python3)
- maweki 9y agoPEP 394 says that python should point to python2 for the time being. https://www.python.org/dev/peps/pep-0394/ https://www.python.org/dev/peps/pep-0394/
- toyg 9y agoYup, 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.
- Freak_NL 9y agoAny proper Python script starts with a shebang: #!/usr/bin/env python3 This works on all modern Linux distributions today.
- OJFord 9y agoYes, and if you write it like that, the output of `python --version` has direct consequences for the remainder of the script.