title: How do I detect the Python version at runtime?
body: <p>I have a Python file which might have to support Python versions &lt; 3.x and >= 3.x. Is there a way to introspect the Python runtime to know the version which it is running (for example, <code>2.6 or 3.2.x</code>)?</p>