[python] How do I detect the Python version at runtime?