Naughty Python
- linux, python, bash, inaccurate
- 1
- finished
2021-11-28: This is no longer true with Python 3
Here’s an interesting fact:
$ python --version
Python 2.7.2+
$ python --version | sed "s/7/2/"
Python 2.7.2+
$ python --version 2>&1 | sed "s/7/2/"
Python 2.2.2+
Why CPython prints its version number on stderr
? It’s worth remembering if
you want for example control Python version in installer scripts.