When I start the Python interpreter in command line mode I get a message saying which compiler was used for building it. Is there a way to get this information in Python ? I know I could start the interpreter with subprocess.Popen and parse the output, but I’m looking for an easier and more elegant method.
The background is that I want to build Python extensions for a CMake based C++ framework, and I would like to write a CMake macro wich checks if the correct compiler is installed.
Use
platform.python_compiler().