title: How to monkey patch the "python --version" command?
body: <p>The <code>-v</code>/<code>--version</code> flag is used to print out the version of the respective <code>python</code> interpreter.</p>
  <p>For example, if <code>python</code> is aliased to the Python 3.7.9 interpreter, the flag would print out the following:</p>
  <pre><code>$ python --version
  Python3.7.9
  </code></pre>
  <p>Can one create a Python module which on installation monkey patches this command for the user? Caveat is that this needs to be cross-platform. How would one about doing so?</p>
  <p>For example, say I have <code>my-package</code> uploaded on PyPI. If I installed it, it would modify the behaviour of <code>pyhton -v</code>/<code>python --version</code>.</p>
  <pre><code>$ python --version
  Python3.7.9
  $ pip install my-package
  ...
  $ python --version
  &lt;some custom text&gt;
  </code></pre>
  <p>Preferably on uninstallation, the <code>-v</code>/<code>--version</code> goes back to normal.</p>