I\'d like to detect if python is installed on a Linux system and if it is, which python version is installed.
How can I do it? Is there something more graceful than
python -c 'import sys; print sys.version_info'
or, human-readable:
python -c 'import sys; print(".".join(map(str, sys.version_info[:3])))'